From 1452d902c2f7a34d1fc6766cff7edfb5a5f2cce1 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Tue, 11 Jun 2024 08:52:44 +0200 Subject: [PATCH] reduce matrix load on CIs --- .github/workflows/cibuildwheel.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 8ba9f0412..42e760fd4 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -67,12 +67,26 @@ jobs: with: fetch-depth: 0 submodules: 'true' - + + - name: Build oldest and newest Python + shell: bash + # On PRs we run only oldest and newest Python versions to reduce CI load. + # Skips pypy and musllinux everywhere. + # We are buiding 38 and 312 for now. + # These needs to rotate every new Python release. + run: | + if [[ "${{ github.event_name }}" == "pull_request" ]]; then + CIBW_SKIP="pp* cp36-* cp37-* *-musllinux* cp39-* cp310-* cp311-*" + else + CIBW_SKIP="pp* cp36-* cp37-* *-musllinux*" + fi + echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV + echo "Setting CIBW_SKIP=$CIBW_SKIP" + - name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels" uses: pypa/cibuildwheel@v2.18.1 env: - # Skips pypy and musllinux for now. - CIBW_SKIP: "pp* cp36-* cp37-* *-musllinux*" + CIBW_SKIP: ${{ env.CIBW_SKIP }} CIBW_ARCHS: ${{ matrix.arch }} CIBW_BUILD_FRONTEND: build CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28