Correct build.yml file #473
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: Build | |
| on: [push, pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build_wheels: | |
| name: Build and test on ${{ matrix.os }}${{ matrix.numpy-version && format(' (numpy {0})', matrix.numpy-version) || '' }} for ${{ matrix.arch }} | |
| runs-on: ${{ matrix.runs-on || matrix.os }} | |
| permissions: | |
| contents: write | |
| env: | |
| CIBW_ARCHS_LINUX: ${{ matrix.arch }} | |
| CIBW_ARCHS_MACOS: "x86_64 arm64" | |
| CIBW_ENABLE: cpython-freethreading | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux x86_64 builds | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| artifact_name: "linux-x86_64" | |
| numpy-version: null | |
| # Linux x86_64 with numpy 1.23 | |
| - os: ubuntu-latest | |
| arch: x86_64 | |
| artifact_name: "linux-x86_64_numpy1_23" | |
| numpy-version: "1.23" | |
| # Linux ARM64 builds (native runners) | |
| - os: ubuntu-24.04-arm | |
| arch: aarch64 | |
| artifact_name: "linux-aarch64" | |
| numpy-version: null | |
| # Windows builds | |
| - os: windows-latest | |
| arch: x86_64 | |
| artifact_name: "windows-x86_64" | |
| numpy-version: null | |
| # macOS builds (universal2) | |
| - os: macos-latest | |
| arch: x86_64 | |
| artifact_name: "macos-universal2" | |
| numpy-version: "null" | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v3 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Install specific numpy version | |
| if: matrix.numpy-version | |
| run: pip install "numpy==${{ matrix.numpy-version }}.*" | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.3 | |
| - name: Make sdist | |
| if: ${{ matrix.os == 'windows-latest' }} | |
| run: | | |
| python -m pip install build | |
| python -m build --sdist --outdir wheelhouse . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ./wheelhouse/* | |
| - name: Upload to GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: wheelhouse/* |