Bundle GTSAM into the same wheel as GTDynamics. #20
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
| # Build Python wheels using cibuildwheel. | |
| # This workflow leverages cibuildwheel's before-all and before-build hooks to properly | |
| # separate non-Python dependencies from Python-version-specific builds. | |
| name: Build Python Wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| - feature/python-wheels-ci | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| # Linux x86_64 | |
| - os: ubuntu-latest | |
| cibw_archs: x86_64 | |
| # Linux aarch64 | |
| - os: ubuntu-24.04-arm | |
| cibw_archs: aarch64 | |
| # macOS arm64 (macOS 14 Sonoma) | |
| - os: macos-14 | |
| cibw_archs: arm64 | |
| macos_deployment_target: "14.0" | |
| # macOS arm64 (macOS 15 Sequoia) | |
| - os: macos-15 | |
| cibw_archs: arm64 | |
| macos_deployment_target: "15.0" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install cibuildwheel | |
| run: python -m pip install cibuildwheel==2.21.0 | |
| - name: Build wheels | |
| run: python -m cibuildwheel --output-dir wheelhouse | |
| env: | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| MACOSX_DEPLOYMENT_TARGET: ${{ matrix.macos_deployment_target }} | |
| - name: List wheels | |
| run: ls -lah wheelhouse/ | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: wheels-${{ matrix.os }}-${{ matrix.cibw_archs }} | |
| path: wheelhouse/*.whl | |
| merge_wheels: | |
| name: Merge all wheels | |
| needs: build_wheels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist/ | |
| pattern: wheels-* | |
| merge-multiple: true | |
| - name: List all wheels | |
| run: ls -la dist/ | |
| - name: Upload combined wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: all-wheels | |
| path: dist/*.whl |