Migrate use of tiledb_array_consolidate_with_key deprecated API. #6314
Workflow file for this run
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
name: TileDB Python CI | |
on: [push, pull_request, workflow_dispatch] | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-12, windows-latest] | |
python-version: ["3.8", "3.9", "3.10", "3.11"] | |
fail-fast: false | |
env: | |
# 11.7 necessary due to: https://github.com/actions/setup-python/issues/682#issuecomment-1604261330 | |
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.os == 'macos-12' && matrix.python-version == '3.8' && '11.7' || '11' }} | |
#MACOSX_DEPLOYMENT_TARGET: "10.11" | |
# On windows-2019 we are using the Visual Studio generator, which is multi-config and places the build artifacts in a subdirectory | |
steps: | |
- name: Checkout TileDB-Py `dev` | |
uses: actions/checkout@v3 | |
# By default Visual Studio chooses the earliest installed toolset version | |
# for the main build and vcpkg chooses the latest. Force it to use the | |
# latest (14.39 currently). | |
- name: Setup MSVC toolset (VS 2022) | |
uses: TheMrMilchmann/setup-msvc-dev@v3 | |
if: matrix.os == 'windows-latest' | |
with: | |
arch: x64 | |
toolset: 14.39 | |
- name: Install Ninja (VS 2022) | |
uses: seanmiddleditch/gha-setup-ninja@v4 | |
if: matrix.os == 'windows-latest' | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Print Python version | |
run: | | |
which python | |
which pip | |
python --version | |
- name: Print env | |
run: printenv | |
- name: Print pip debug info | |
run: pip debug --verbose | |
# Remove after upstream PR fully-deployed: | |
# - https://github.com/actions/runner-images/pull/7125 | |
- name: "Install homebrew dependencies" | |
run: brew install pkg-config | |
if: matrix.os == 'macos-12' | |
- name: "Install dependencies" | |
run: python -m pip install --upgrade -r misc/requirements_ci.txt | |
- name: "Get TILEDB_VERSION" | |
run: echo "LIBTILEDB_VERSION=$(python setup.py get_tiledb_version | tail -n 1)" >> $GITHUB_ENV | |
- name: "Get LIBTILEDB_SHA" | |
run: echo "LIBTILEDB_SHA=$(git ls-remote https://github.com/TileDB-Inc/TileDB $LIBTILEDB_VERSION | cut -c1-7)" >> $GITHUB_ENV | |
- name: "Download TileDB From Zip And Build TileDB-Py (Windows)" | |
run: | | |
choco install wget --no-progress | |
if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-windows-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.zip; then | |
mkdir libtiledb | |
unzip tiledb-windows-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.zip -d libtiledb | |
cp libtiledb/bin/tiledb.dll tiledb | |
python setup.py develop --tiledb=libtiledb | |
else | |
# Build from source as fallback | |
python setup.py build_ext --inplace | |
python setup.py develop | |
fi | |
env: | |
TILEDB_FORCE_ALL_DEPS: True | |
CMAKE_GENERATOR: "Ninja" | |
if: matrix.os == 'windows-latest' | |
- name: "Download TileDB From Tarball And Build TileDB-Py (macOS)" | |
run: | | |
set -xeo pipefail | |
if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-macos-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz; then | |
mkdir libtiledb | |
sudo tar -vzxf tiledb-macos-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz -C libtiledb | |
python setup.py develop --tiledb=libtiledb | |
else | |
# Build from source as fallback | |
python setup.py build_ext --inplace | |
python setup.py develop | |
fi | |
if: matrix.os == 'macos-12' | |
- name: "Download TileDB From Tarball And Build TileDB-Py (Linux)" | |
run: | | |
set -xeo pipefail | |
if wget https://github.com/TileDB-Inc/TileDB/releases/download/$LIBTILEDB_VERSION/tiledb-linux-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz; then | |
mkdir libtiledb | |
sudo tar -vzxf tiledb-linux-x86_64-$LIBTILEDB_VERSION-$LIBTILEDB_SHA.tar.gz -C libtiledb | |
python setup.py develop --tiledb=libtiledb | |
else | |
# Build from source as fallback | |
python setup.py build_ext --inplace | |
python setup.py develop | |
fi | |
if: matrix.os == 'ubuntu-latest' | |
- name: "Check build directory" | |
run: ls -Rl | |
- name: "Install libfaketime (linux and macOS)" | |
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-12' | |
run: | | |
git clone https://github.com/wolfcw/libfaketime/ | |
cd libfaketime | |
sudo make install | |
cd .. | |
- name: "Run tests" | |
run: pytest -vv --showlocals | |
- name: "Print log files (failed build only)" | |
run: | | |
set -xeo pipefail | |
# Display log files if the build failed | |
echo 'Dumping log files for failed build' | |
echo '----------------------------------' | |
for f in $(find build -name *.log); | |
do echo '------' | |
echo $f | |
echo '======' | |
cat $f | |
done; | |
if: failure() |