From 6282fc38c2fc76ad8e734a6f412d1859367c9e7d Mon Sep 17 00:00:00 2001 From: John Blischak Date: Sat, 10 Aug 2024 08:19:15 -0400 Subject: [PATCH] Fix nightly build by updating source build of TileDB-Py (#756) * Migrate TileDB-Py to scikit-build-core and don't check for deprecations * Run TileDB-Py import test outside of Git repo https://github.com/jdblischak/centralized-tiledb-nightlies/commit/81849b95e56dbac94ca2b04e91595482644c51cb * Bump nightly build release branch to 2.25 * Pin pyarrow==12 --- .github/workflows/nightly.yml | 14 ++------------ ci/nightly/build-tiledb-py.sh | 29 +++++++++++++++++++++++++++++ ci/nightly/build-tiledbvcf-py.sh | 2 +- ci/nightly/requirements.txt | 9 --------- 4 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 ci/nightly/build-tiledb-py.sh delete mode 100644 ci/nightly/requirements.txt diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 283556419..9e5b8decb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -24,7 +24,7 @@ jobs: matrix: os: [macos-12, ubuntu-latest] branches: - - {libtiledb: release-2.24, tiledb-py: 0.30.1} + - {libtiledb: release-2.25, tiledb-py: 0.31.1} - {libtiledb: dev, tiledb-py: dev} env: MACOSX_DEPLOYMENT_TARGET: 10.15 @@ -75,18 +75,8 @@ jobs: uses: actions/setup-python@v5 with: python-version: "3.10" - - name: Install dependencies for tiledb-py build - run: | - python -m pip install --prefer-binary \ - -r TileDB-VCF/ci/nightly/requirements.txt - pip list - name: Build tiledb-py from source - run: | - cd TileDB-Py/ - python setup.py develop --tiledb=../install/ - python -c "import tiledb; print('successful import')" - python -c "import tiledb; print(tiledb.libtiledb.version())" - python -c "import tiledb; print(tiledb.version())" + run: bash TileDB-VCF/ci/nightly/build-tiledb-py.sh - name: Build (and test) tiledbvcf-py run: bash TileDB-VCF/ci/nightly/build-tiledbvcf-py.sh issue: diff --git a/ci/nightly/build-tiledb-py.sh b/ci/nightly/build-tiledb-py.sh new file mode 100644 index 000000000..bbc988ace --- /dev/null +++ b/ci/nightly/build-tiledb-py.sh @@ -0,0 +1,29 @@ +#!/bin/bash +set -ex + +# Build tiledb-py assuming source code directory is ./TileDB-Py/ and libtiledb +# shared library installed in $GITHUB_WORKSPACE/install/ + +OS=$(uname) +echo "OS: $OS" +if [[ $OS == Linux ]] +then + export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/lib:${LD_LIBRARY_PATH-} + echo "LD_LIBRARY_PATH: $LD_LIBRARY_PATH" +elif [[ $OS == Darwin ]] +then + export DYLD_LIBRARY_PATH=$GITHUB_WORKSPACE/install/lib:${DYLD_LIBRARY_PATH-} + echo "DYLD_LIBRARY_PATH: $DYLD_LIBRARY_PATH" +fi + +export TILEDB_PATH=$GITHUB_WORKSPACE/install/ + +cd TileDB-Py/ +python -m pip install -Cskbuild.cmake.define.TILEDB_REMOVE_DEPRECATIONS=OFF -v . pyarrow==12 + +# Can't run the import inside of the Git repo because Python automatically looks +# for `./module/__init.py__` +cd .. +python -c "import tiledb; print('successful import')" +python -c "import tiledb; print(tiledb.libtiledb.version())" +python -c "import tiledb; print(tiledb.version())" diff --git a/ci/nightly/build-tiledbvcf-py.sh b/ci/nightly/build-tiledbvcf-py.sh index 54fc1af45..ef50f77ce 100644 --- a/ci/nightly/build-tiledbvcf-py.sh +++ b/ci/nightly/build-tiledbvcf-py.sh @@ -20,7 +20,7 @@ fi export LIBTILEDBVCF_PATH=$GITHUB_WORKSPACE/install/ cd TileDB-VCF/apis/python -python -m pip install .[test] +python -m pip install .[test] pyarrow==12 python -c "import tiledbvcf; print(tiledbvcf.version)" pytest diff --git a/ci/nightly/requirements.txt b/ci/nightly/requirements.txt deleted file mode 100644 index aca17f814..000000000 --- a/ci/nightly/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -numpy<2 -pandas -pyarrow==11 -pyarrow-hotfix -pybind11 -setuptools -setuptools_scm -setuptools_scm_git_archive -wheel