Build Static Multiplatform Wheels #36
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 Static Multiplatform Wheels | |
| on: | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| # macos-13 is an intel runner, macos-14 is apple silicon | |
| os: [windows-latest, macos-13, macos-14] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # By default, Python 3.8 is not ARM64 compatible on macOS | |
| - name: Set up Python 3.8 on macOS arm64 | |
| if: runner.os == 'macOS' && matrix.os == 'macos-14' | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.8 | |
| - name: Set MACOSX_DEPLOYMENT_TARGET for macOS x86_64 | |
| if: runner.os == 'macOS' && matrix.os == 'macos-13' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=10.15" >> $GITHUB_ENV | |
| echo "CIBW_PLATFORM=macos" >> $GITHUB_ENV | |
| - name: Set MACOSX_DEPLOYMENT_TARGET for macOS arm64 | |
| if: runner.os == 'macOS' && matrix.os == 'macos-14' | |
| run: | | |
| echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | |
| echo "CIBW_PLATFORM=macos" >> $GITHUB_ENV | |
| - name: Set CIBW_PLATFORM for Windows | |
| if: runner.os == 'Windows' | |
| run: echo "CIBW_PLATFORM=windows" >> $GITHUB_ENV | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v2.23.2 | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: ${{ env.MACOSX_DEPLOYMENT_TARGET }} | |
| CIBW_PLATFORM: ${{ env.CIBW_PLATFORM }} | |
| PROJECT_ROOT: ${{ github.workspace }} | |
| OIIO_STATIC: 1 | |
| CIBW_ENVIRONMENT: OIIO_STATIC=1 | |
| with: | |
| output-dir: wheelhouse | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: cibw-static-wheels-${{ matrix.os }}-${{ strategy.job-index }} | |
| path: ./wheelhouse/*.whl |