Skip to content

Commit 34f085c

Browse files
committed
Set number of parallel test processes in workflow
1 parent 9e7d64d commit 34f085c

File tree

2 files changed

+31
-33
lines changed

2 files changed

+31
-33
lines changed

.github/workflows/ci.yaml

+30-30
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
rm -rf dist/
4848
python -m pip install build
4949
python -m build --sdist
50-
50+
5151
echo "sdist_artifact_name=$(ls ./dist)" >> "$GITHUB_OUTPUT"
5252
echo "package_version=$(ls ./dist | sed -En 's/cffi-(.+)\.tar\.gz/\1/p')" >> "$GITHUB_OUTPUT"
5353
@@ -76,21 +76,21 @@ jobs:
7676
7777
- spec: cp39-manylinux_x86_64
7878
omit: ${{ env.skip_ci_redundant_jobs }}
79-
79+
8080
- spec: cp310-manylinux_x86_64
8181
omit: ${{ env.skip_ci_redundant_jobs }}
8282
8383
- spec: cp311-manylinux_x86_64
8484
omit: ${{ env.skip_ci_redundant_jobs }}
85-
85+
8686
- spec: cp312-manylinux_x86_64
8787
omit: ${{ env.skip_ci_redundant_jobs }}
8888
8989
- spec: cp313-manylinux_x86_64
90-
90+
9191
- spec: cp313t-manylinux_x86_64
9292
skip_artifact_upload: 'true'
93-
93+
9494
- spec: cp38-manylinux_i686
9595
omit: ${{ env.skip_ci_redundant_jobs }}
9696
@@ -108,10 +108,10 @@ jobs:
108108
109109
- spec: cp313-manylinux_i686
110110
omit: ${{ env.skip_ci_redundant_jobs }}
111-
111+
112112
- spec: cp39-musllinux_x86_64
113113
omit: ${{ env.skip_ci_redundant_jobs }}
114-
114+
115115
- spec: cp310-musllinux_x86_64
116116
omit: ${{ env.skip_ci_redundant_jobs }}
117117
@@ -120,9 +120,9 @@ jobs:
120120
121121
- spec: cp312-musllinux_x86_64
122122
omit: ${{ env.skip_ci_redundant_jobs }}
123-
123+
124124
- spec: cp313-musllinux_x86_64
125-
125+
126126
- spec: cp39-musllinux_i686
127127
omit: ${{ env.skip_ci_redundant_jobs }}
128128
@@ -134,14 +134,14 @@ jobs:
134134
135135
#- spec: cp312-musllinux_i686 # busted as of 2024-05-17
136136
# omit: ${{ env.skip_ci_redundant_jobs }}
137-
137+
138138
#- spec: cp313-musllinux_i686 # busted as of 2024-05-17
139-
139+
140140
- spec: cp39-musllinux_aarch64
141141
foreign_arch: true
142142
test_args: '{package}/src/c'
143143
omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }}
144-
144+
145145
- spec: cp310-musllinux_aarch64
146146
foreign_arch: true
147147
test_args: '{package}/src/c'
@@ -156,12 +156,12 @@ jobs:
156156
foreign_arch: true
157157
test_args: '{package}/src/c'
158158
omit: ${{ env.skip_ci_redundant_jobs || env.skip_slow_jobs }}
159-
159+
160160
- spec: cp313-musllinux_aarch64
161161
foreign_arch: true
162162
# test_args: '{package}/src/c'
163163
omit: ${{ env.skip_slow_jobs}}
164-
164+
165165
- spec: cp38-manylinux_aarch64
166166
foreign_arch: true
167167
test_args: '{package}/src/c'
@@ -186,12 +186,12 @@ jobs:
186186
foreign_arch: true
187187
test_args: '{package}/src/c'
188188
omit: ${{ env.skip_slow_jobs || env.skip_ci_redundant_jobs }}
189-
189+
190190
- spec: cp313-manylinux_aarch64
191191
foreign_arch: true
192192
# test_args: '{package}/src/c'
193193
omit: ${{ env.skip_slow_jobs }}
194-
194+
195195
- spec: cp38-manylinux_ppc64le
196196
foreign_arch: true
197197
test_args: '{package}/src/c'
@@ -221,7 +221,7 @@ jobs:
221221
foreign_arch: true
222222
test_args: '{package}/src/c'
223223
omit: ${{ env.skip_slow_jobs }}
224-
224+
225225
- spec: cp38-manylinux_s390x
226226
foreign_arch: true
227227
test_args: '{package}/src/c'
@@ -299,12 +299,12 @@ jobs:
299299
CIBW_PRERELEASE_PYTHONS: 'True'
300300
CIBW_FREE_THREADED_SUPPORT: 'True'
301301
CIBW_TEST_REQUIRES: pytest pytest-xdist setuptools # 3.12+ no longer includes distutils, just always ensure setuptools is present
302-
CIBW_TEST_COMMAND: PYTHONUNBUFFERED=1 python -m pytest ${{ matrix.test_args || '{project}' }} # default to test all
302+
CIBW_TEST_COMMAND: PYTHONUNBUFFERED=1 python -m pytest -n auto ${{ matrix.test_args || '{project}' }} # default to test all
303303
run: |
304304
set -eux
305-
305+
306306
mkdir cffi
307-
307+
308308
tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
309309
python -m pip install --upgrade "${{ matrix.cibw_version || 'cibuildwheel' }}"
310310
@@ -418,18 +418,18 @@ jobs:
418418
CIBW_BUILD: ${{ matrix.spec }}
419419
CIBW_PRERELEASE_PYTHONS: 'True'
420420
CIBW_TEST_REQUIRES: pytest pytest-xdist setuptools
421-
CIBW_TEST_COMMAND: pip install pip --upgrade; cd {project}; PYTHONUNBUFFERED=1 pytest
421+
CIBW_TEST_COMMAND: pip install pip --upgrade; cd {project}; PYTHONUNBUFFERED=1 pytest -n auto
422422
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deployment_target || '10.9' }}
423423
SDKROOT: ${{ matrix.sdkroot || 'macosx' }}
424424
run: |
425425
set -eux
426-
426+
427427
mkdir cffi
428-
428+
429429
tar zxf ${{ steps.fetch_sdist.outputs.download-path }}/cffi*.tar.gz --strip-components=1 -C cffi
430430
431431
python3 -m cibuildwheel --output-dir dist cffi
432-
432+
433433
echo "artifact_name=$(ls ./dist/)" >> "$GITHUB_OUTPUT"
434434
435435
- name: upload artifacts
@@ -509,20 +509,20 @@ jobs:
509509
CIBW_BUILD: ${{ matrix.spec }}
510510
CIBW_PRERELEASE_PYTHONS: 'True'
511511
CIBW_TEST_REQUIRES: pytest pytest-xdist setuptools
512-
CIBW_TEST_COMMAND: 'python -m pytest {package}/src/c'
512+
CIBW_TEST_COMMAND: 'python -m pytest -n auto {package}/src/c'
513513
# FIXME: /testing takes ~45min on Windows and has some failures...
514-
# CIBW_TEST_COMMAND='python -m pytest {package}/src/c {project}/testing'
514+
# CIBW_TEST_COMMAND='python -m pytest -n auto {package}/src/c {project}/testing'
515515
run: |
516516
set -eux
517-
517+
518518
mkdir cffi
519-
519+
520520
tar zxf cffi*.tar.gz --strip-components=1 -C cffi
521-
521+
522522
python -m pip install --upgrade pip
523523
pip install "${{ matrix.cibw_version || 'cibuildwheel'}}"
524524
python -m cibuildwheel --output-dir dist cffi
525-
525+
526526
echo "artifact_name=$(ls ./dist/)" >> "$GITHUB_OUTPUT"
527527
528528
shell: bash

pyproject.toml

+1-3
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,8 @@ addopts ="""
5858
--durations 10
5959
--color yes
6060
--showlocals
61-
-n auto
62-
--maxprocesses 7
6361
"""
6462
testpaths = [
6563
"src/c",
6664
"testing/",
67-
]
65+
]

0 commit comments

Comments
 (0)