diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 068f51799..9aa86cf6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,13 +11,13 @@ # * https://github.com/actions/upload-artifact on: [push, pull_request] -name: build +name: build_wheels concurrency: group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.sha || '' }} cancel-in-progress: true jobs: # Linux + macOS + Windows Python 3 - py3: + wheels: name: py3-${{ matrix.os }}-${{ startsWith(matrix.os, 'windows') && matrix.archs || 'all' }} runs-on: ${{ matrix.os }} timeout-minutes: 30 @@ -38,34 +38,49 @@ jobs: with: python-version: 3.11 - - name: Create wheels + run tests + - name: Build wheels for CPython 3.11 uses: pypa/cibuildwheel@v2.16.2 env: + CIBW_BUILD: "cp311-*" CIBW_ARCHS: "${{ matrix.archs }}" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + MACOSX_DEPLOYMENT_TARGET: "10.12" CIBW_PRERELEASE_PYTHONS: True CIBW_SKIP: "*musllinux* pp* pp31*" CIBW_BUILD_VERBOSITY: 1 CIBW_TEST_COMMAND: > - python -c "import psutil" + python -c "import psutil" + + - name: Build wheels for CPython 3.10 + uses: pypa/cibuildwheel@v2.16.2 + env: + CIBW_BUILD: "cp310-*" + CIBW_ARCHS: "${{ matrix.archs }}" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + MACOSX_DEPLOYMENT_TARGET: "10.12" + CIBW_PRERELEASE_PYTHONS: True + CIBW_SKIP: "*musllinux* pp* pp31*" + CIBW_BUILD_VERBOSITY: 1 + CIBW_TEST_COMMAND: > + python -c "import psutil" + + - name: Build wheels for CPython 3.9 + uses: pypa/cibuildwheel@v2.16.2 + env: + CIBW_BUILD: "cp39-*" + CIBW_ARCHS: "${{ matrix.archs }}" + CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 + MACOSX_DEPLOYMENT_TARGET: "10.12" + CIBW_PRERELEASE_PYTHONS: True + CIBW_SKIP: "*musllinux* pp* pp31*" + CIBW_BUILD_VERBOSITY: 1 + CIBW_TEST_COMMAND: > + python -c "import psutil" + - name: Upload wheels uses: actions/upload-artifact@v3 with: name: wheels path: wheelhouse - check-dist: - needs: [py3] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: 3.11 - - uses: actions/download-artifact@v3 - with: - name: wheels - path: wheelhouse - - run: | - python scripts/internal/print_hashes.py wheelhouse/ - pipx run twine check --strict wheelhouse/* - pipx run abi3audit --verbose --strict wheelhouse/*-abi3-*.whl +dd