Switch to new scikit-build-core build system #24
Workflow file for this run
This file contains hidden or 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: Binary Wheels | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: [ published ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| persist-credentials: false | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: cibw-sdist | |
| path: dist/*.tar.gz | |
| build_wheels: | |
| name: Build wheel for cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| # Ensure that a wheel builder finishes even if another fails. Useful for | |
| # debugging multiple problems in parallel. | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux 64 bit manylinux | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| python: 310 | |
| builder: manylinux | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| python: 311 | |
| builder: manylinux | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| python: 312 | |
| builder: manylinux | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| python: 313 | |
| builder: manylinux | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| python: 314 | |
| builder: manylinux | |
| # MacOS x86_64. | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| python: 310 | |
| builder: macosx | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| python: 311 | |
| builder: macosx | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| python: 312 | |
| builder: macosx | |
| - os: macos-15-intel | |
| arch: x86_64 | |
| python: 313 | |
| builder: macosx | |
| # MacOS arm64 | |
| - os: macos-15 | |
| arch: arm64 | |
| python: 310 | |
| builder: macosx | |
| - os: macos-15 | |
| arch: arm64 | |
| python: 311 | |
| builder: macosx | |
| - os: macos-15 | |
| arch: arm64 | |
| python: 312 | |
| builder: macosx | |
| - os: macos-15 | |
| arch: arm64 | |
| python: 313 | |
| builder: macosx | |
| - os: macos-15 | |
| arch: arm64 | |
| python: 314 | |
| builder: macosx | |
| env: | |
| CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }} | |
| CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.builder }}_2_28 | |
| CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.builder }}_2_28 | |
| CIBW_BUILD_VERBOSITY: 3 | |
| CIBW_ENVIRONMENT_LINUX: > | |
| CC=gcc | |
| CIBW_ENVIRONMENT_MACOS: > | |
| CC=clang | |
| CIBW_BEFORE_BUILD_LINUX: ./packaging/wheels/install_deps_linux.sh | |
| CIBW_BEFORE_BUILD_MACOS: ./packaging/wheels/install_deps_osx.sh | |
| CIBW_TEST_REQUIRES: h5py zarr | |
| CIBW_BEFORE_TEST: export OMP_NUM_THREADS=2 | |
| CIBW_TEST_COMMAND: python3 -c 'import flacarray.tests; flacarray.tests.run()' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| name: Install Python | |
| with: | |
| python-version: '3.13' | |
| - name: Install cibuildwheel | |
| run: | | |
| python -m pip install cibuildwheel==3.3.1 | |
| - name: Build wheel | |
| run: | | |
| python -m cibuildwheel --output-dir wheelhouse | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: cibw-wheels_cp${{ matrix.python }}-${{ matrix.builder }}_${{ matrix.arch }} | |
| path: ./wheelhouse/flacarray*cp${{ matrix.python }}-${{ matrix.builder }}*${{ matrix.arch }}*.whl | |
| upload_pypi: | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| if: github.event_name == 'release' && github.event.action == 'published' | |
| steps: | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| # Unpacks all artifacts into dist/ | |
| pattern: cibw-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 |