Build secondary wheels #101
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 secondary wheels | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| pull_request: | |
| paths: | |
| - '**' | |
| workflow_dispatch: | |
| jobs: | |
| build_wheels: | |
| name: Build secondary wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| cibw_archs: all | |
| - os: ubuntu-24.04-arm | |
| cibw_archs: all | |
| - os: windows-latest | |
| cibw_archs: all | |
| - os: windows-11-arm | |
| cibw_archs: all | |
| - os: macos-latest | |
| cibw_archs: all | |
| - os: macos-15-intel | |
| cibw_archs: all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.2.1 | |
| env: | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| CIBW_SKIP: cp31[!0]{t,}-* pp* *-manylinux_x86_64 *-win_amd64 | |
| CIBW_TEST_REQUIRES: pytest typing_extensions mypy | |
| CIBW_TEST_COMMAND: > | |
| python -X faulthandler {package}/test/debug.py && | |
| python -X faulthandler -m pytest -p no:faulthandler -s {package} && | |
| python {package}/test/run_type_checker.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: secondary_wheel_artifact_${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_old_wheels: | |
| name: Build old wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| cibw_archs: all | |
| - os: ubuntu-24.04-arm | |
| cibw_archs: all | |
| - os: windows-latest | |
| cibw_archs: all | |
| - os: macos-latest | |
| cibw_archs: all | |
| - os: macos-15-intel | |
| cibw_archs: all | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v2.23.3 | |
| env: | |
| CIBW_ARCHS: ${{ matrix.cibw_archs }} | |
| CIBW_BUILD: cp31[67]-* pp* | |
| CIBW_TEST_REQUIRES: pytest typing_extensions mypy | |
| CIBW_TEST_COMMAND: > | |
| python -X faulthandler {package}/test/debug.py && | |
| python -X faulthandler -m pytest -p no:faulthandler -s {package} && | |
| python {package}/test/run_type_checker.py | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: old_wheel_artifact_${{ matrix.os }} | |
| path: ./wheelhouse/*.whl | |
| build_sdist: | |
| name: Build sdist | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build sdist | |
| run: pipx run build --sdist | |
| - name: Copy sdist package | |
| run: cp dist/frozendict-*.tar.gz dist/frozendict.tar.gz | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.2.1 | |
| env: | |
| CIBW_ARCHS: native | |
| CIBW_BUILD: "cp314-*" | |
| CIBW_SKIP: "*-musllinux_*" | |
| CIBW_TEST_REQUIRES: pytest typing_extensions mypy | |
| CIBW_TEST_COMMAND: > | |
| python -X faulthandler {package}/test/debug.py && | |
| python -X faulthandler -m pytest -p no:faulthandler -s {package} && | |
| python {package}/test/run_type_checker.py | |
| with: | |
| package-dir: dist/frozendict.tar.gz | |
| - name: Remove test sdist package | |
| run: rm dist/frozendict.tar.gz | |
| - name: Upload sdist artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| path: dist/*.tar.gz |