Add test requirements #9
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: Build wheels | |
on: | |
workflow_dispatch: | |
push: | |
# branches: | |
# - release-* | |
# - "*wheel*" # must quote since "*" is a YAML reserved character; we want a string | |
# tags: | |
# - "*" | |
pull_request: | |
# branches: | |
# - "*wheel*" # must quote since "*" is a YAML reserved character; we want a string | |
jobs: | |
build_wheels: | |
name: Wheel ${{ matrix.buildplat[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.python }} | |
runs-on: ${{ matrix.buildplat[0] }} | |
strategy: | |
matrix: | |
buildplat: | |
- [ubuntu-22.04, manylinux_x86_64] | |
- [macos-13, macosx_x86_64] | |
- [macos-13, macosx_arm64] | |
- [windows-2022, win_amd64] | |
python: ["cp39", "cp310", "cp311", "cp312", "pp39"] | |
exclude: | |
- buildplat: [macos-13, macosx_arm64] | |
python: "pp39" | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Brew setup on macOS" # x-ref c8e49ba8f8b9ce | |
if: ${{ startsWith(matrix.os, 'macos-') == true }} | |
run: | | |
set -e pipefail | |
brew update | |
brew install automake pkg-config ninja llvm | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD_VERBOSITY: 3 | |
CIBW_ENVIRONMENT_MACOS: > | |
CC=clang | |
CXX=clang++ | |
MACOSX_DEPLOYMENT_TARGET: "12.0" | |
CIBW_ARCHS: all | |
CIBW_PRERELEASE_PYTHONS: True | |
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }} | |
# __init__.py interferes with the tests and is included as local file instead of | |
# used from wheel | |
CIBW_BEFORE_TEST: rm {project}/tiledb/__init__.py | |
CIBW_TEST_REQUIRES: pytest hypothesis psutil pyarrow | |
CIBW_TEST_COMMAND: pytest {project}/tiledb/tests | |
CIBW_ENVIRONMENT: TILEDB_REST_TOKEN=${{ secrets.TILEDB_CLOUD_HELPER_VAR }} | |
SYSTEM_VERSION_COMPAT: ${{ startsWith(matrix.os, 'macos-') }} | |
with: | |
output-dir: wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
path: "./wheelhouse/*.whl" | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build sdist | |
run: pipx run build --sdist | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/*.tar.gz | |
# upload_pypi: | |
# needs: [build_wheels, build_sdist, generate_backwards_compatibility_data] | |
# runs-on: ubuntu-latest | |
# environment: pypi | |
# permissions: | |
# id-token: write | |
# outputs: | |
# package_version: ${{ steps.get_package_version.outputs.package_version }} | |
# steps: | |
# - uses: actions/download-artifact@v4 | |
# with: | |
# path: dist | |
# merge-multiple: true | |
# | |
# - id: get_package_version | |
# run: | | |
# echo "package_version=$(ls dist/ | head -n 1 | cut -d - -f 2)" >> "$GITHUB_OUTPUT" | |
# | |
# - name: Upload to test-pypi | |
# if: ${{ github.event_name == 'workflow_dispatch' }} | |
# uses: pypa/gh-action-pypi-publish@release/v1 | |
# with: | |
# repository-url: https://test.pypi.org/legacy/ | |
# | |
# - name: Upload to pypi | |
# if: ${{ github.event_name != 'workflow_dispatch' }} | |
# uses: pypa/gh-action-pypi-publish@release/v1 |