Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nightly build for Windows #609

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 54 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions ci/nightly/build-libtiledb.bat
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions ci/nightly/build-libtiledbvcf.bat
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions ci/nightly/build-tiledbvcf-py.bat
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions ci/nightly/test-libtiledbvcf.bat
Original file line number Diff line number Diff line change
@@ -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 <build-dir> <inputs-dir>
bash $GITHUB_WORKSPACE\TileDB-VCF\libtiledbvcf\test\run-cli-tests.sh build-libtiledbvcf TileDB-VCF\libtiledbvcf\test\inputs
Loading