-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #507 from jdblischak/build-win-py
Build tiledbvcf-py on Windows
- Loading branch information
Showing
8 changed files
with
168 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build Python client for Windows | ||
on: | ||
push: | ||
paths: | ||
- '.github/workflows/windows.yml' | ||
- 'apis/python/**' | ||
- 'ci/*.bat' | ||
- 'ci/gha-win-env.yml' | ||
- 'libtiledbvcf/**' | ||
pull_request: | ||
paths: | ||
- '.github/workflows/windows.yml' | ||
- 'apis/python/**' | ||
- 'ci/*.bat' | ||
- 'ci/gha-win-env.yml' | ||
- 'libtiledbvcf/**' | ||
workflow_dispatch: | ||
# Unfortunately, simply setting the default shell is currently insufficient to | ||
# activate the conda env for the cmd shell. This is a known, unresolved issue | ||
# | ||
# https://github.com/mamba-org/provision-with-micromamba/issues/39 | ||
# https://github.com/mamba-org/provision-with-micromamba/pull/43 | ||
# https://github.com/mamba-org/provision-with-micromamba/pull/56 | ||
# | ||
# A workaround is to manually call `@CALL micromamba activate <name of env>` | ||
# | ||
# https://github.com/blue-yonder/turbodbc/pull/380/files#diff-72b980456954eec0c566d17ce7746f2c1f7c6b9b98b1ad01395b6f7cb8c4ca0b | ||
defaults: | ||
run: | ||
shell: cmd /C CALL {0} | ||
jobs: | ||
build: | ||
runs-on: windows-2022 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install conda env | ||
uses: mamba-org/provision-with-micromamba@main | ||
with: | ||
environment-file: ci/gha-win-env.yml | ||
cache-env: true | ||
- name: Build libtiledbvcf | ||
run: | | ||
@CALL micromamba activate win-env | ||
cmd /C CALL ci\build-libtiledbvcf.bat | ||
- name: libtiledbvcf version | ||
run: | | ||
@CALL micromamba activate win-env | ||
tiledbvcf.exe version | ||
- name: Build tiledbvcf-py | ||
run: | | ||
@CALL micromamba activate win-env | ||
cmd /C CALL ci\build-tiledbvcf-py.bat | ||
- name: tiledbvcf-py version | ||
run: | | ||
@CALL micromamba activate win-env | ||
python -c "import tiledbvcf; print(tiledbvcf.version)" | ||
- name: Test | ||
run: | | ||
@CALL micromamba activate win-env | ||
pytest apis\python\tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
@echo on | ||
|
||
mkdir libtiledbvcf-build | ||
cd libtiledbvcf-build | ||
|
||
rem configure | ||
cmake ^ | ||
-DCMAKE_INSTALL_PREFIX:PATH="%CONDA_PREFIX%\Library" ^ | ||
-DOVERRIDE_INSTALL_PREFIX=OFF ^ | ||
-DCMAKE_BUILD_TYPE=Release ^ | ||
-DFORCE_EXTERNAL_HTSLIB=OFF ^ | ||
../libtiledbvcf | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
rem build | ||
cmake --build . --config Release --parallel %CPU_COUNT% | ||
if %ERRORLEVEL% neq 0 exit 1 | ||
|
||
rem install | ||
cmake --build . --target install-libtiledbvcf --config Release | ||
if %ERRORLEVEL% neq 0 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@echo on | ||
|
||
cd apis\python | ||
|
||
python setup.py install ^ | ||
--single-version-externally-managed ^ | ||
--record record.txt ^ | ||
--libtiledbvcf="%CONDA_PREFIX%\Library" | ||
if %ERRORLEVEL% neq 0 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: win-env | ||
channels: | ||
- conda-forge | ||
- tiledb | ||
- nodefaults | ||
dependencies: | ||
# build libtiledbvcf | ||
- cmake | ||
- git | ||
- m2w64-htslib | ||
- tiledb=2.15 | ||
- vs2019_win-64 | ||
# build tiledbvcf-py | ||
- numpy | ||
- pandas | ||
- pyarrow=9.0 | ||
- pybind11 | ||
- python | ||
- rpdb | ||
- setuptools | ||
- setuptools_scm=6.0.1 | ||
- setuptools_scm_git_archive | ||
- wheel | ||
# test tiledbvcf-py | ||
- dask | ||
- fsspec<2023.3.0 | ||
- pytest | ||
- tiledb-py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters