Skip to content

Commit 1452d90

Browse files
committed
reduce matrix load on CIs
1 parent 78d1c4f commit 1452d90

1 file changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,26 @@ jobs:
6767
with:
6868
fetch-depth: 0
6969
submodules: 'true'
70-
70+
71+
- name: Build oldest and newest Python
72+
shell: bash
73+
# On PRs we run only oldest and newest Python versions to reduce CI load.
74+
# Skips pypy and musllinux everywhere.
75+
# We are buiding 38 and 312 for now.
76+
# These needs to rotate every new Python release.
77+
run: |
78+
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
79+
CIBW_SKIP="pp* cp36-* cp37-* *-musllinux* cp39-* cp310-* cp311-*"
80+
else
81+
CIBW_SKIP="pp* cp36-* cp37-* *-musllinux*"
82+
fi
83+
echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV
84+
echo "Setting CIBW_SKIP=$CIBW_SKIP"
85+
7186
- name: "Building ${{ matrix.os }} (${{ matrix.arch }}) wheels"
7287
uses: pypa/cibuildwheel@v2.18.1
7388
env:
74-
# Skips pypy and musllinux for now.
75-
CIBW_SKIP: "pp* cp36-* cp37-* *-musllinux*"
89+
CIBW_SKIP: ${{ env.CIBW_SKIP }}
7690
CIBW_ARCHS: ${{ matrix.arch }}
7791
CIBW_BUILD_FRONTEND: build
7892
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28

0 commit comments

Comments
 (0)