diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 4433215..c7cacc2 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -8,12 +8,58 @@ concurrency: jobs: build_wheels: - name: Build wheel on ${{ matrix.os }} - runs-on: ${{ matrix.os }} + name: Build wheel - ${{ matrix.cibw.build }} ${{ matrix.os.name }} + runs-on: ${{ matrix.os.runs-on }} strategy: fail-fast: false matrix: - os: [macos-10.15, ubuntu-latest, windows-latest] + os: + - name: macOS + runs-on: macos-10.15 + matrix: macos + - name: Linux + runs-on: ubuntu-latest + matrix: linux + - name: Windows + runs-on: windows-latest + matrix: windows + cibw: + # build just supported python versions at December 2021 + - build: cp27-* + group: old + - build: cp35-* + group: old + - build: cp36-* + group: old + - build: pp27-* + group: old + - build: pp36-* + group: old + - build: cp37-* + group: new + - build: cp38-* + group: new + - build: cp39-* + group: new + - build: cp310-* + group: new + - build: cp311-* + group: new + - build: pp37-* + group: new + - build: pp38-* + group: new + - build: pp39-* + group: new + exclude: + - os: + matrix: windows + cibw: + build: cp27-* + - os: + matrix: windows + cibw: + build: pp27-* steps: - name: Checkout code @@ -31,24 +77,24 @@ jobs: python -m pip install --upgrade pip - name: Set up QEMU - if: startsWith(matrix.os, 'ubuntu') + if: matrix.os.matrix == 'linux' uses: docker/setup-qemu-action@v1 with: platforms: 'arm64' - name: Build source distribution with Ubuntu - if: startsWith(matrix.os, 'ubuntu') + if: matrix.os.matrix == 'linux' run: | pip install build python -m build --sdist --outdir dist . - - name: Build ${{ matrix.os }} wheels and test (old) + - name: Build ${{ matrix.os.name }} wheels and test (old) uses: joerick/cibuildwheel@v1.11.1 + if: matrix.cibw.group == 'old' with: output-dir: dist env: - # build just supported python versions at December 2021 - CIBW_BUILD: 'cp27-* cp35-* cp36-* pp27-* pp36-*' + CIBW_BUILD: ${{ matrix.cibw.build }} # Skip 32-bit builds // NO # CIBW_SKIP: '*-win32 *_i686' CIBW_MANYLINUX_I686_IMAGE: manylinux1 @@ -73,13 +119,13 @@ jobs: CIBW_TEST_COMMAND: > python -m unittest discover -v -s {package} - - name: Build ${{ matrix.os }} wheels and test (new) + - name: Build ${{ matrix.os.name }} wheels and test (new) uses: joerick/cibuildwheel@v2.11.1 + if: matrix.cibw.group == 'new' with: output-dir: dist env: - # build just supported python versions at December 2021 - CIBW_BUILD: 'cp37-* cp38-* cp39-* cp310-* cp311-* pp37-* pp38-* pp39-*' + CIBW_BUILD: ${{ matrix.cibw.build }} # Skip 32-bit builds // NO # CIBW_SKIP: '*-win32 *_i686' CIBW_MANYLINUX_I686_IMAGE: manylinux2014