Skip to content

Commit 682b397

Browse files
authored
Merge branch 'main' into ios-test-command-change
2 parents 7c73ec2 + 5b65230 commit 682b397

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+807
-385
lines changed

.circleci/config.yml

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,41 @@
1-
version: 2
1+
version: 2.1
2+
3+
commands:
4+
cibw_prepare_environment:
5+
description: "Prepare the environment for testing."
6+
steps:
7+
- run:
8+
name: Prepare the environment.
9+
command: bash .circleci/prepare.sh
10+
cibw_run_tests:
11+
description: "Runs tests, with CIBW_ENABLE=all on the main branch"
12+
steps:
13+
- run:
14+
name: Test
15+
command: |
16+
if [ "${CIRCLE_BRANCH}" == "main" ]; then
17+
echo "INFO: Exporting CIBW_ENABLE=all for main branch test run."
18+
export CIBW_ENABLE=all
19+
else
20+
echo "INFO: CIBW_ENABLE not set for this branch test run."
21+
fi
22+
23+
venv/bin/python ./bin/run_tests.py
24+
no_output_timeout: 30m
225

326
jobs:
4-
osx-python3.12:
27+
osx-python312:
528
macos:
629
xcode: 15.4.0
730
resource_class: macos.m1.medium.gen1
831
environment:
932
PYTHON: python3
1033
steps:
1134
- checkout
35+
- cibw_prepare_environment
36+
- cibw_run_tests
1237

13-
- run:
14-
name: Prepare the environment.
15-
command: bash .circleci/prepare.sh
16-
- run:
17-
name: Test.
18-
command: venv/bin/python ./bin/run_tests.py
19-
no_output_timeout: 30m
20-
21-
linux-python3.12:
38+
linux-python312:
2239
docker:
2340
- image: cimg/python:3.12
2441
environment:
@@ -29,14 +46,8 @@ jobs:
2946
steps:
3047
- checkout
3148
- setup_remote_docker
32-
33-
- run:
34-
name: Prepare the environment.
35-
command: bash .circleci/prepare.sh
36-
- run:
37-
name: Test.
38-
command: venv/bin/python ./bin/run_tests.py
39-
no_output_timeout: 30m
49+
- cibw_prepare_environment
50+
- cibw_run_tests
4051

4152
linux-aarch64:
4253
machine:
@@ -49,19 +60,13 @@ jobs:
4960
PYTEST_ADDOPTS: -k "unit_test or main_tests or test_0_basic or test_docker_images"
5061
steps:
5162
- checkout
52-
53-
- run:
54-
name: Prepare the environment.
55-
command: bash .circleci/prepare.sh
56-
- run:
57-
name: Test.
58-
command: venv/bin/python ./bin/run_tests.py
59-
no_output_timeout: 30m
63+
- cibw_prepare_environment
64+
- cibw_run_tests
6065

6166
workflows:
6267
version: 2
6368
all-tests:
6469
jobs:
65-
- osx-python3.12
66-
- linux-python3.12
70+
- osx-python312
71+
- linux-python312
6772
- linux-aarch64

.cirrus.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ windows_x86_task:
6262

6363
macos_arm64_task:
6464
macos_instance:
65-
image: ghcr.io/cirruslabs/macos-runner:sonoma
65+
image: ghcr.io/cirruslabs/macos-runner:sequoia
6666
env:
6767
VENV_ROOT: ${HOME}/venv-cibuildwheel
6868
PATH: ${VENV_ROOT}/bin:${PATH}
@@ -73,11 +73,11 @@ macos_arm64_task:
7373

7474
macos_arm64_cp38_task:
7575
macos_instance:
76-
image: ghcr.io/cirruslabs/macos-runner:sonoma
76+
image: ghcr.io/cirruslabs/macos-runner:sequoia
7777
env:
7878
VENV_ROOT: ${HOME}/venv-cibuildwheel
7979
PATH: ${VENV_ROOT}/bin:${PATH}
80-
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto'
80+
PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto or test_dummy_serial'
8181
install_pre_requirements_script:
8282
- brew install python@3.12
8383
- python3.12 -m venv ${VENV_ROOT}

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
path: dist
3434

3535
- name: Generate artifact attestation for sdist and wheel
36-
uses: actions/attest-build-provenance@c074443f1aee8d4aeeae555aebba3282517141b2 # v2.2.3
36+
uses: actions/attest-build-provenance@db473fddc028af60658334401dc6fa3ffd8669fd # v2.3.0
3737
with:
3838
subject-path: "dist/cibuildwheel-*"
3939

.github/workflows/test.yml

Lines changed: 36 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ on:
66
- main
77
- 2.x
88
pull_request:
9+
types:
10+
- opened
11+
- synchronize
12+
- reopened
13+
- labeled
914
paths-ignore:
1015
- 'docs/**'
1116
- .pre-commit-config.yaml
@@ -36,7 +41,7 @@ jobs:
3641
runs-on: ${{ matrix.os }}
3742
strategy:
3843
matrix:
39-
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-15]
44+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm, macos-13, macos-15]
4045
python_version: ['3.13']
4146
include:
4247
- os: ubuntu-latest
@@ -50,7 +55,7 @@ jobs:
5055
python-version: ${{ matrix.python_version }}
5156
allow-prereleases: true
5257

53-
- uses: astral-sh/setup-uv@v5
58+
- uses: astral-sh/setup-uv@v6
5459

5560
# free some space to prevent reaching GHA disk space limits
5661
- name: Clean docker images
@@ -68,9 +73,29 @@ jobs:
6873
run: |
6974
uv sync --no-dev --group test
7075
76+
- uses: joerick/pr-labels-action@v1.0.9
77+
- name: Set CIBW_ENABLE
78+
shell: bash
79+
run: |
80+
if [[ "${{ github.ref_name }}" == "main" ]]; then
81+
CIBW_ENABLE=all
82+
else
83+
# get the default CIBW_ENABLE value from the test module
84+
CIBW_ENABLE=$(uv run --no-sync python -c 'import sys, test.conftest as c; sys.stdout.write(c.DEFAULT_CIBW_ENABLE)')
85+
86+
# if this is a PR, check for labels
87+
if [[ -n "$GITHUB_PR_LABEL_CI_PYPY" ]]; then
88+
CIBW_ENABLE+=" pypy"
89+
fi
90+
if [[ -n "$GITHUB_PR_LABEL_CI_GRAALPY" ]]; then
91+
CIBW_ENABLE+=" graalpy"
92+
fi
93+
fi
94+
echo "CIBW_ENABLE=${CIBW_ENABLE}" >> $GITHUB_ENV
95+
7196
- name: Generate a sample project
7297
run: |
73-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
98+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
7499
75100
- name: Run a sample build (GitHub Action)
76101
uses: ./
@@ -80,7 +105,6 @@ jobs:
80105
env:
81106
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
82107
CIBW_BUILD_FRONTEND: 'build[uv]'
83-
CIBW_ENABLE: "cpython-prerelease cpython-freethreading pypy"
84108

85109
- name: Run a sample build (GitHub Action, only)
86110
uses: ./
@@ -122,7 +146,7 @@ jobs:
122146

123147
- name: Test cibuildwheel
124148
run: |
125-
uv run bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
149+
uv run --no-sync bin/run_tests.py ${{ (runner.os == 'Linux' && runner.arch == 'X64') && '--run-podman' || '' }}
126150
127151
emulated-archs:
128152
name: Get qemu emulated architectures
@@ -135,13 +159,13 @@ jobs:
135159
- uses: actions/setup-python@v5
136160
with:
137161
python-version: "3.x"
138-
- uses: astral-sh/setup-uv@v5
162+
- uses: astral-sh/setup-uv@v6
139163
- name: Install dependencies
140164
run: uv sync --no-dev --group test
141165
- name: Get qemu emulated architectures
142166
id: archs
143167
run: |
144-
OUTPUT=$(uv run python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
168+
OUTPUT=$(uv run --no-sync python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
145169
echo "${OUTPUT}"
146170
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
147171
@@ -158,15 +182,15 @@ jobs:
158182
- uses: actions/setup-python@v5
159183
with:
160184
python-version: "3.x"
161-
- uses: astral-sh/setup-uv@v5
185+
- uses: astral-sh/setup-uv@v6
162186
- name: Install dependencies
163187
run: uv sync --no-dev --group test
164188

165189
- name: Set up QEMU
166190
uses: docker/setup-qemu-action@v3
167191

168192
- name: Run the emulation tests
169-
run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
193+
run: uv run --no-sync pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
170194

171195
test-pyodide:
172196
name: Test cibuildwheel building Pyodide wheels
@@ -179,14 +203,14 @@ jobs:
179203
name: Install Python 3.12
180204
with:
181205
python-version: '3.12'
182-
- uses: astral-sh/setup-uv@v5
206+
- uses: astral-sh/setup-uv@v6
183207

184208
- name: Install dependencies
185209
run: uv sync --no-dev --group test
186210

187211
- name: Generate a sample project
188212
run: |
189-
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
213+
uv run --no-sync -m test.test_projects test.test_0_basic.basic_project sample_proj
190214
191215
- name: Run a sample build (GitHub Action)
192216
uses: ./
@@ -198,6 +222,6 @@ jobs:
198222

199223
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
200224
run: |
201-
uv run ./bin/run_tests.py
225+
uv run --no-sync ./bin/run_tests.py
202226
env:
203227
CIBW_PLATFORM: pyodide

.github/workflows/update-dependencies.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- uses: actions/checkout@v4
3434

35-
- uses: wntrblm/nox@2025.02.09
35+
- uses: wntrblm/nox@2025.05.01
3636

3737
- name: "Run update: dependencies"
3838
run: nox --force-color -s update_constraints

.gitlab-ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ linux:
1313
# skip all but the basic tests
1414
# (comment the below line in a PR to debug a Gitlab-specific issue)
1515
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
16+
rules:
17+
- if: '$CI_COMMIT_BRANCH == "main"'
18+
variables:
19+
CIBW_ENABLE: "all"
1620
script:
1721
- curl -sSL https://get.docker.com/ | sh
1822
- docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all
@@ -26,6 +30,10 @@ windows:
2630
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
2731
before_script:
2832
- choco install python -y --version 3.12.4
33+
rules:
34+
- if: '$CI_COMMIT_BRANCH == "main"'
35+
variables:
36+
CIBW_ENABLE: "all"
2937
script:
3038
- py -m pip install dependency-groups
3139
- py -m pip install -e. pytest-custom-exit-code $(py -m dependency_groups test)
@@ -37,6 +45,10 @@ macos:
3745
image: macos-14-xcode-15
3846
variables:
3947
PYTEST_ADDOPTS: -k "unit_test or test_0_basic" --suppress-no-test-exit-code
48+
rules:
49+
- if: '$CI_COMMIT_BRANCH == "main"'
50+
variables:
51+
CIBW_ENABLE: "all"
4052
script:
4153
- python3 -m pip install dependency-groups
4254
- python3 -m dependency_groups test | xargs python3 -m pip install -e. pytest-custom-exit-code

.pre-commit-config.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: trailing-whitespace
1515

1616
- repo: https://github.com/astral-sh/ruff-pre-commit
17-
rev: v0.11.4
17+
rev: v0.11.8
1818
hooks:
1919
- id: ruff
2020
args: ["--fix", "--show-fixes"]
@@ -25,7 +25,6 @@ repos:
2525
hooks:
2626
- id: mypy
2727
name: mypy 3.11 on cibuildwheel/
28-
exclude: ^cibuildwheel/resources/.*py$
2928
args: ["--python-version=3.11"]
3029
additional_dependencies: &mypy-dependencies
3130
- bracex
@@ -81,7 +80,7 @@ repos:
8180

8281

8382
- repo: https://github.com/python-jsonschema/check-jsonschema
84-
rev: 0.32.1
83+
rev: 0.33.0
8584
hooks:
8685
- id: check-dependabot
8786
- id: check-github-actions

.travis.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,17 @@ jobs:
1414
- name: Linux | x86_64 + i686 | Python 3.12
1515
python: 3.12
1616
services: docker
17-
env: PYTHON=python
17+
env:
18+
- PYTHON=python
19+
- CIBW_ENABLE=all
1820

1921
- name: Linux | arm64 | Python 3.12
2022
python: 3.12
2123
services: docker
2224
arch: arm64
23-
env: PYTHON=python
25+
env:
26+
- PYTHON=python
27+
- CIBW_ENABLE=all
2428

2529
- name: Linux | ppc64le | Python 3.12
2630
python: 3.12
@@ -32,6 +36,7 @@ jobs:
3236
# skip test_manylinuxXXXX_only, it uses too much disk space
3337
# c.f. https://travis-ci.community/t/running-out-of-disk-space-quota-when-using-docker-on-ppc64le/11634
3438
- PYTEST_ADDOPTS='-k "not test_manylinuxXXXX_only"'
39+
- CIBW_ENABLE=all
3540

3641
- name: Windows | x86_64 | Python 3.12
3742
os: windows
@@ -40,13 +45,16 @@ jobs:
4045
- choco upgrade python3 -y --version 3.12.8 --limit-output --params "/InstallDir:C:\\Python312"
4146
env:
4247
- PYTHON=C:\\Python312\\python
48+
- CIBW_ENABLE=all
4349

4450
- name: Linux | s390x | Python 3.12
4551
python: 3.12
4652
services: docker
4753
arch: s390x
4854
allow_failure: True
49-
env: PYTHON=python
55+
env:
56+
- PYTHON=python
57+
- CIBW_ENABLE=all
5058

5159
install:
5260
- if [ "${TRAVIS_OS_NAME}" == "linux" ]; then docker run --rm --privileged docker.io/tonistiigi/binfmt:latest --install all; fi

0 commit comments

Comments
 (0)