Skip to content

Commit 8ee8ec8

Browse files
authored
Merge pull request #393 from neutrinoceros/cibw-static-conf
MNT: move most of cibuildwheel config to pyproject.toml
2 parents 3873bc9 + a23f993 commit 8ee8ec8

2 files changed

Lines changed: 23 additions & 19 deletions

File tree

.github/workflows/cibuildwheel.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,12 @@ jobs:
4343
# if: runner.os == 'Linux' && matrix.arch == 'aarch64'
4444

4545
- name: Build just oldest and newest on PRs, all on tags
46+
if: ${{ github.event_name }} == pull_request
4647
shell: bash
47-
# - Always omit musllinux_aarch64 because it's slow and niche
4848
# - On PPs, omit musllinux for speed
4949
# - On PRs, run just oldest and newest Python versions
5050
run: |
51-
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
52-
CIBW_SKIP="cp311-* cp312-* cp313-* *musllinux*"
53-
else
54-
CIBW_SKIP="*musllinux_aarch64"
55-
fi
56-
# skip cp310 if building on windows arm64
57-
if [[ "${{ matrix.arch }}" == "ARM64" ]]; then
58-
CIBW_SKIP="$CIBW_SKIP cp310-*"
59-
fi
51+
CIBW_SKIP="cp310-win_arm64 cp311-* cp312-* cp313-* *musllinux*"
6052
echo "CIBW_SKIP=$CIBW_SKIP" >> $GITHUB_ENV
6153
echo "Setting CIBW_SKIP=$CIBW_SKIP"
6254
@@ -65,15 +57,6 @@ jobs:
6557
env:
6658
CIBW_SKIP: ${{ env.CIBW_SKIP }}
6759
CIBW_ARCHS: ${{ matrix.arch }}
68-
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
69-
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux2014
70-
# Emulated testing is slow, so trust that the Python 3.14 test is good enough on aarch64
71-
# (takes about 5 minutes per wheel to build, and 5 minutes to test)
72-
CIBW_TEST_SKIP: "cp3{10,11,12,13}-*_aarch64"
73-
CIBW_TEST_GROUPS: dev
74-
CIBW_TEST_COMMAND: >
75-
python -c "import cftime; print(f'cftime v{cftime.__version__}')" &&
76-
python -m pytest -vv {package}/test
7760

7861
- uses: actions/upload-artifact@v6
7962
with:

pyproject.toml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,3 +106,24 @@ ignore = [
106106
"test",
107107
"test/*",
108108
]
109+
110+
[tool.cibuildwheel]
111+
build-verbosity = 1
112+
skip = [
113+
"*musllinux_aarch64*",
114+
# Skipped due to unavailability of Python binary and NumPy for Win-ARM64
115+
"cp310-win_arm64",
116+
]
117+
118+
test-skip = [
119+
# Emulated testing is slow, so trust that the Python 3.14 test is good enough on aarch64
120+
# (takes about 5 minutes per wheel to build, and 5 minutes to test)
121+
"cp3{10,11,12,13}-*_aarch64",
122+
]
123+
test-groups = "dev"
124+
test-command = [
125+
'''python -c "import cftime; print(f'cftime v{cftime.__version__}')"''',
126+
"python -m pytest -vv {package}/test"
127+
]
128+
manylinux-x86_64-image = "manylinux2014"
129+
manylinux-aarch64-image = "manylinux2014"

0 commit comments

Comments
 (0)