diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e892a1ce2..6fbd6fee8 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -105,11 +105,64 @@ jobs: -r TileDB-VCF/ci/nightly/requirements-test.txt - name: Build (and test) tiledbvcf-py run: bash TileDB-VCF/ci/nightly/build-tiledbvcf-py.sh + windows: + runs-on: windows-latest + name: win-libtiledb-${{ matrix.libtiledb_version }} + strategy: + fail-fast: false + matrix: + libtiledb_version: [release-2.18, dev] + defaults: + run: + shell: cmd + steps: + - name: Clone TileDB + uses: actions/checkout@v3 + with: + repository: TileDB-Inc/TileDB + ref: ${{ matrix.libtiledb_version }} + path: TileDB + - name: Clone TileDB-VCF + uses: actions/checkout@v3 + with: + path: TileDB-VCF + fetch-depth: 0 # fetch everything for python setuptools_scm + - name: Build libtiledb + run: cmd /C CALL TileDB-VCF/ci/nightly/build-libtiledb.bat + - name: Build libtiledbvcf + run: cmd /C CALL TileDB-VCF\ci\nightly\build-libtiledbvcf.bat + - name: Upload installation directory as artifact + uses: actions/upload-artifact@v3 + with: + name: win-nightly-libtiledbvcf-libtiledb-${{ matrix.libtiledb_version }} + path: | + install/* + retention-days: 14 + - uses: ilammy/msvc-dev-cmd@v1 + - name: Confirm linking + run: | + echo %GITHUB_WORKSPACE% + dumpbin /dependents %GITHUB_WORKSPACE%\install\bin\tiledbvcf.dll + dumpbin /dependents %GITHUB_WORKSPACE%\install\bin\tiledbvcf.exe + dumpbin /imports %GITHUB_WORKSPACE%\install\bin\tiledbvcf.dll | findstr /i dll + dumpbin /imports %GITHUB_WORKSPACE%\install\bin\tiledbvcf.dll + # - name: Test libtiledbvcf + # run: cmd /C CALL TileDB-VCF\ci\nightly\test-libtiledbvcf.bat + - name: Setup conda env + uses: mamba-org/setup-micromamba@v1 + with: + environment-file: TileDB-VCF/ci/nightly/environment.yaml + cache-environment: true + init-shell: cmd.exe + - name: Build (and test) tiledbvcf-py + # need custom shell directive to activate conda env + shell: cmd /C CALL {0} + run: cmd /C CALL TileDB-VCF\ci\nightly\build-tiledbvcf-py.bat issue: permissions: issues: write runs-on: ubuntu-latest - needs: [linux, osx] + needs: [linux, osx, windows] if: ( failure() || cancelled() ) && github.repository_owner == 'TileDB-Inc' && github.event_name == 'schedule' steps: - uses: actions/checkout@v3 diff --git a/ci/nightly/build-libtiledb.bat b/ci/nightly/build-libtiledb.bat new file mode 100644 index 000000000..ce4081872 --- /dev/null +++ b/ci/nightly/build-libtiledb.bat @@ -0,0 +1,18 @@ +@echo on + +rem Build libtiledb assuming source code directory is .\TileDB + +cmake -S TileDB -B build-libtiledb ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_INSTALL_PREFIX:PATH=%GITHUB_WORKSPACE%\install\ ^ + -D TILEDB_WERROR=ON ^ + -D TILEDB_SERIALIZATION=ON ^ + -D TILEDB_VCPKG=OFF ^ + -D TILEDB_S3=ON +if %ERRORLEVEL% neq 0 exit 1 + +cmake --build build-libtiledb -j2 --config Release +if %ERRORLEVEL% neq 0 exit 1 + +cmake --build build-libtiledb --config Release --target install-tiledb +if %ERRORLEVEL% neq 0 exit 1 diff --git a/ci/nightly/build-libtiledbvcf.bat b/ci/nightly/build-libtiledbvcf.bat new file mode 100644 index 000000000..a795d2aba --- /dev/null +++ b/ci/nightly/build-libtiledbvcf.bat @@ -0,0 +1,22 @@ +@echo on + +rem Build libtiledbvcf assuming source code directory is .\TileDB-VCF\libtiledbvcf + +cmake -S TileDB-VCF\libtiledbvcf -B build-libtiledbvcf ^ + -D CMAKE_BUILD_TYPE=Release ^ + -D CMAKE_INSTALL_PREFIX:PATH=%GITHUB_WORKSPACE%\install\ ^ + -D OVERRIDE_INSTALL_PREFIX=OFF ^ + -D TILEDB_WERROR=OFF ^ + -D CMAKE_INSTALL_LIBDIR=bin +if %ERRORLEVEL% neq 0 exit 1 + +cmake --build build-libtiledbvcf -j2 --config Release +if %ERRORLEVEL% neq 0 exit 1 + +cmake --build build-libtiledbvcf --config Release --target install-libtiledbvcf +if %ERRORLEVEL% neq 0 exit 1 + +dir /s %GITHUB_WORKSPACE%\install\ + +rem %GITHUB_WORKSPACE%\install\bin\tiledbvcf version +rem if %ERRORLEVEL% neq 0 exit 1 diff --git a/ci/nightly/build-tiledbvcf-py.bat b/ci/nightly/build-tiledbvcf-py.bat new file mode 100644 index 000000000..72a4d5009 --- /dev/null +++ b/ci/nightly/build-tiledbvcf-py.bat @@ -0,0 +1,17 @@ +@echo on + +rem Build (and test) tiledbvcf-py assuming source code directory is +rem .\TileDB-VCF\apis\python + +set PATH=%GITHUB_WORKSPACE%\install\bin;%PATH% +echo "PATH: %PATH%" + +cd TileDB-VCF\apis\python +python setup.py develop --libtiledbvcf=%GITHUB_WORKSPACE%\install\ +if %ERRORLEVEL% neq 0 exit 1 + +python -c "import tiledbvcf; print(tiledbvcf.version)" +if %ERRORLEVEL% neq 0 exit 1 + +pytest +if %ERRORLEVEL% neq 0 exit 1 diff --git a/ci/nightly/test-libtiledbvcf.bat b/ci/nightly/test-libtiledbvcf.bat new file mode 100644 index 000000000..2dfe9dadd --- /dev/null +++ b/ci/nightly/test-libtiledbvcf.bat @@ -0,0 +1,11 @@ +@echo on + +rem Test libtiledbvcf assuming source code directory is .\TileDB-VCF\libtiledbvcf +rem and build directory is build-libtiledbvcf + +make -j2 -C build-libtiledbvcf\libtiledbvcf tiledb_vcf_unit +$GITHUB_WORKSPACE\build-libtiledbvcf\libtiledbvcf\test\tiledb_vcf_unit + +rem cli tests (require bcftools) +rem USAGE: run-cli-tests.sh +bash $GITHUB_WORKSPACE\TileDB-VCF\libtiledbvcf\test\run-cli-tests.sh build-libtiledbvcf TileDB-VCF\libtiledbvcf\test\inputs