| name: TileDB Python CI - With Earliest Supported Version of NumPy |
|
|
| on: |
| workflow_dispatch: |
| inputs: |
| libtiledb_version: |
| description: TileDB Core Version |
| required: true |
| type: string |
| workflow_call: |
| inputs: |
| libtiledb_version: |
| required: true |
| type: string |
|
|
| jobs: |
| test: |
| runs-on: ${{ matrix.os }} |
| defaults: |
| run: |
| shell: bash |
| strategy: |
| matrix: |
| os: [ubuntu-latest, macos-13, macos-14, windows-latest] |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
| include: |
| |
| - python-version: "3.13" |
| numpy-version: "2.1.0" |
| - python-version: "3.12" |
| numpy-version: "1.26.4" |
| - python-version: "3.12" |
| numpy-version: "2.0.1" |
| - python-version: "3.11" |
| numpy-version: "1.25.2" |
| - python-version: "3.11" |
| numpy-version: "2.0.1" |
| - python-version: "3.10" |
| numpy-version: "1.25.2" |
| - python-version: "3.10" |
| numpy-version: "2.0.1" |
| - python-version: "3.9" |
| numpy-version: "1.25.2" |
| fail-fast: false |
| env: |
| TILEDB_VERSION: ${{ inputs.libtiledb_version }} |
| MACOSX_DEPLOYMENT_TARGET: "11" |
| VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite' |
| steps: |
| - name: Checkout TileDB-Py `dev` |
| uses: actions/checkout@v4 |
|
|
| - name: Setup MSVC toolset (VS 2022) |
| uses: TheMrMilchmann/setup-msvc-dev@v3 |
| if: startsWith(matrix.os, 'windows') |
| with: |
| arch: x64 |
|
|
| - name: Install Ninja (VS 2022) |
| uses: seanmiddleditch/gha-setup-ninja@v4 |
| if: startsWith(matrix.os, 'windows') |
|
|
| - name: Enable vcpkg binary caching |
| uses: actions/github-script@v6 |
| with: |
| script: | |
| core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); |
| core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); |
| |
| - name: "Set CMAKE_GENERATOR" |
| run: export CMAKE_GENERATOR="Ninja" |
| if: startsWith(matrix.os, 'windows') |
|
|
| - name: Set up Python ${{ matrix.python-version }} |
| uses: actions/setup-python@v5 |
| with: |
| python-version: ${{ matrix.python-version }} |
|
|
| - name: Print Python version |
| run: | |
| which python |
| which pip |
| python --version |
| |
| - name: Print env |
| run: printenv |
|
|
| - name: Checkout TileDB-Py `dev` |
| uses: actions/checkout@v3 |
|
|
| - name: Build TileDB-Py |
| run: pip install --verbose .[test] |
|
|
| - name: Install Numpy |
| run: | |
| pip install numpy==${{ matrix.numpy-version }} |
| |
| - name: Print installed Python dependencies |
| run: pip list |
|
|
| - name: Run tests |
| run: | |
| PROJECT_CWD=$PWD |
| rm tiledb/__init__.py |
| cd /tmp |
| pytest -vv --showlocals $PROJECT_CWD |
| |
| create_issue_on_fail: |
| permissions: |
| issues: write |
| runs-on: ubuntu-latest |
| needs: test |
| if: failure() || cancelled() |
| steps: |
| - uses: actions/checkout@v3 |
| - name: Create Issue if Build Fails |
| uses: TileDB-Inc/github-actions/open-issue@main |
| with: |
| name: nightly build with earliest supported numpy |
| label: bug,nightly-failure |
| assignee: kounelisagis,nguyenv,ihnorton |