From 1c179e93a8149509d0a732f629c355fe4855320f Mon Sep 17 00:00:00 2001 From: John Blischak Date: Fri, 30 Aug 2024 15:07:15 -0400 Subject: [PATCH] Build TileDB-VCF-Py on Windows without conda --- .github/workflows/windows.yml | 34 +++++++++------------ libtiledbvcf/cmake/Modules/FindHTSlib.cmake | 4 +-- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 9c14fee05..8c5242f2b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,31 +18,27 @@ on: - 'ci/gha-win-env.yml' - 'libtiledbvcf/**' workflow_dispatch: -defaults: - run: - shell: cmd /C CALL {0} jobs: build: runs-on: windows-2022 steps: - uses: actions/checkout@v4 - - name: Install conda env - uses: mamba-org/setup-micromamba@v1 with: - environment-file: ci/gha-win-env.yml - cache-environment: true - init-shell: cmd.exe - condarc: | - channels: - - conda-forge - - tiledb - channel_priority: strict - - name: Build libtiledbvcf - run: cmd /C CALL ci\build-libtiledbvcf.bat - - name: libtiledbvcf version - run: tiledbvcf.exe version - - name: Build tiledbvcf-py - run: cmd /C CALL ci\build-tiledbvcf-py.bat + fetch-depth: 0 # fetch everything for python setuptools_scm + - name: Build and install libtiledbvcf + run: | + cmake -S libtiledbvcf -B libtiledbvcf\build + cmake --build libtiledbvcf\build -j2 + cmake --build libtiledbvcf\build -j2 --target install-libtiledbvcf + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + - name: Install tiledbvcf-py + run: | + set TileDB_DIR=.\libtiledbvcf\build\externals\install\lib\cmake\TileDB\ + cd apis\python + python -m pip install -v .[test,dev] - name: tiledbvcf-py version run: python -c "import tiledbvcf; print(tiledbvcf.version)" - name: Test diff --git a/libtiledbvcf/cmake/Modules/FindHTSlib.cmake b/libtiledbvcf/cmake/Modules/FindHTSlib.cmake index 9bf26dd08..4ae5db6d9 100644 --- a/libtiledbvcf/cmake/Modules/FindHTSlib.cmake +++ b/libtiledbvcf/cmake/Modules/FindHTSlib.cmake @@ -91,11 +91,11 @@ if (NOT HTSLIB_FOUND) message("CMD_EXE_PATH is ${CMD_EXE_PATH}") string(REPLACE "/" "\\\\" CMD_EXE_PATH_FWD_SLASH "${CMD_EXE_PATH}") message("CMD_EXE_PATH_FWD_SLASH is ${CMD_EXE_PATH_FWD_SLASH}") - + ExternalProject_Add(ep_htslib PREFIX "externals" URL https://github.com/TileDB-Inc/m2w64-htslib-build/releases/download/1.20-0/m2w64-htslib-1.20-0.tar.gz - URL_HASH SHA1=da39a3ee5e6b4b0d3255bfef95601890afd80709 + URL_HASH SHA1=6f3e208ccc0262f89dcdf344d96e40696a5db133 UPDATE_COMMAND "" CONFIGURE_COMMAND "" BUILD_COMMAND ""