Build wheels #25
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: | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build wheels for ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, | |
| # windows-latest, | |
| # macos-15-intel, | |
| macos-latest | |
| ] | |
| steps: | |
| - uses: mamba-org/setup-micromamba@v2 | |
| with: | |
| init-shell: bash | |
| cache-downloads: true | |
| - name: Checkout mapflpy | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install nox[pbs] | |
| - name: macOS SDK + nox conda backend | |
| if: startsWith(matrix.os, 'macos-') | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> "$GITHUB_ENV" | |
| echo "SDKROOT=$(xcrun --sdk macosx --show-sdk-path)" >> "$GITHUB_ENV" | |
| echo "CFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV" | |
| echo "CXXFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV" | |
| echo "FCFLAGS=-isysroot $SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV" | |
| echo "LDFLAGS=-Wl,-syslibroot,$SDKROOT -mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" >> "$GITHUB_ENV" | |
| # nox uses conda backend → micromamba | |
| echo "CONDA_EXE=micromamba" >> "$GITHUB_ENV" | |
| - name: Build wheels | |
| run: | | |
| nox -s build | |
| - name: Repair wheels | |
| run: | | |
| nox -s repair | |
| - name: List built wheels | |
| run: | | |
| ls -lR .nox/_artifacts/ | |
| - name: Run tests on built wheels | |
| run: | | |
| nox -s test | |
| - name: Upload wheel artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }} | |
| path: .nox/_artifacts/wheelhouse/*.whl | |
| retention-days: 30 |