3.14 Wheels #1070
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| push: | |
| branches: | |
| - master | |
| release: | |
| types: published | |
| jobs: | |
| tar_gz: | |
| name: Package | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-python@master | |
| with: | |
| python-version: 3.14 | |
| - run: pip install -r requirements-build-3_14.txt | |
| - run: python setup.py sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-sdist | |
| path: dist/* | |
| matrix_config: | |
| name: Matrix Runner Config | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix_os: ${{ steps.step.outputs.matrix_os }} | |
| steps: | |
| - run: echo "$GITHUB_EVENT_NAME" | |
| - id: step | |
| run: | | |
| if [ "$GITHUB_EVENT_NAME" = "release" ]; then | |
| echo 'matrix_os=["macos-13-xlarge", "macos-13", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT | |
| else | |
| echo 'matrix_os=["macos-13", "ubuntu-22.04", "windows-2022"]' >> $GITHUB_OUTPUT | |
| fi | |
| wheels: | |
| name: Build / ${{ matrix.os }} / Python 3.${{ matrix.python.minor }} / FT${{ matrix.python.ft }} | |
| needs: matrix_config | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ fromJson(needs.matrix_config.outputs.matrix_os) }} | |
| python: | |
| - {minor: 10, req_build: 'requirements-build-3_11.txt', req_test: 'requirements-dev-3_11.txt', ft: '0'} | |
| - {minor: 11, req_build: 'requirements-build-3_11.txt', req_test: 'requirements-dev-3_11.txt', ft: '0'} | |
| - {minor: 12, req_build: 'requirements-build-3_12.txt', req_test: 'requirements-dev-3_12.txt', ft: '0'} | |
| - {minor: 13, req_build: 'requirements-build-3_13.txt', req_test: 'requirements-dev-3_13.txt', ft: '0'} | |
| - {minor: 14, req_build: 'requirements-build-3_14.txt', req_test: 'requirements-dev-3_14.txt', ft: '0'} | |
| - {minor: 14t, req_build: 'requirements-build-3_14.txt', req_test: 'requirements-dev-3_14.txt', ft: '1'} | |
| runs-on: ${{ matrix.os }} | |
| outputs: | |
| artifact_names: ${{ steps.record_artifacts.outputs.artifact_names }} | |
| steps: | |
| - uses: actions/checkout@master | |
| - uses: actions/setup-python@master | |
| - run: echo '::add-matcher::.github/problem-matchers/gcc.json' | |
| if: startsWith(matrix.os, 'macos-') || startsWith(matrix.os, 'ubuntu-') | |
| - run: echo '::add-matcher::.github/problem-matchers/msvc.json' | |
| if: startsWith(matrix.os, 'windows-') | |
| - uses: pypa/cibuildwheel@v3.2.0 | |
| if: matrix.os != 'macos-13-xlarge' | |
| with: | |
| output-dir: dist | |
| env: | |
| CIBW_BUILD: cp3${{ matrix.python.minor }}-* | |
| CIBW_ARCHS_WINDOWS: x86 AMD64 | |
| CIBW_ARCHS_MACOS: x86_64 | |
| CIBW_BEFORE_BUILD: pip install -r {project}/${{ matrix.python.req_build }} | |
| CIBW_BEFORE_TEST: pip install -r {project}/${{ matrix.python.req_test }} | |
| CIBW_TEST_COMMAND: pytest {project}/test | |
| CIBW_ENABLE: ${{ matrix.python.ft == '1' && 'cpython-freethreading' || '' }} | |
| - run: pip install pipx | |
| if: matrix.os == 'macos-13-xlarge' | |
| - uses: pypa/cibuildwheel@v3.2.0 | |
| if: matrix.os == 'macos-13-xlarge' | |
| with: | |
| output-dir: dist | |
| env: | |
| CIBW_BUILD: cp3${{ matrix.python.minor }}-macosx_arm64 | |
| CIBW_BEFORE_BUILD: pip install -r {project}/${{ matrix.python.req_build }} | |
| CIBW_BEFORE_TEST: pip install -r {project}/${{ matrix.python.req_test }} | |
| CIBW_TEST_COMMAND: pytest {project}/test | |
| CIBW_ENABLE: ${{ matrix.python.ft == '1' && 'cpython-freethreading' || '' }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-wheels-${{ matrix.os }}-py3${{ matrix.python.minor }}-t${{ matrix.python.ft }} # Unique artifact name | |
| path: dist/* | |
| upload: | |
| name: Publish | |
| if: github.event_name == 'release' | |
| needs: [tar_gz, wheels] | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| # leave out name to get all | |
| path: dist | |
| merge-multiple: true | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| skip-existing: true |