Skip to content

Commit 1d15ad4

Browse files
committed
Move free-threaded builds to an indindependent job
1 parent 61076a2 commit 1d15ad4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/build.yml

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,9 @@ permissions:
77

88
env:
99
CIBW_BEFORE_BUILD: pip install setuptools oldest-supported-numpy pytest
10-
CIBW_ENVIRONMENT_LINUX: >
11-
IS_FREETHREADED=$(python -c "import sysconfig;print(sysconfig.get_config_var('Py_GIL_DISABLED'))")
12-
PYTEST_RUN_PARALLEL=$([ "$IS_FREETHREADED" == "1" ] && echo "pytest-run-parallel" || echo "")
13-
PARALLEL_THREADS=$([ "$IS_FREETHREADED" == "1" ] && echo "--parallel-threads=4" || echo "")
14-
CIBW_BEFORE_BUILD_LINUX: >
15-
pip install setuptools oldest-supported-numpy pytest $PYTEST_RUN_PARALLEL
10+
CIBW_BEFORE_TEST: pip install pytest
1611
CIBW_BUILD_VERBOSITY: 1
17-
CIBW_TEST_COMMAND: pytest $PARALLEL_THREADS numexpr/tests
12+
CIBW_TEST_COMMAND: pytest numexpr/tests
1813
CIBW_TEST_SKIP: "*macosx*arm64*"
1914
# Building for musllinux and aarch64 takes way too much time.
2015
# Moreover, NumPy is not providing musllinux for x86_64 either, so it's not worth it.
@@ -35,7 +30,7 @@ jobs:
3530
matrix:
3631
os: [ubuntu-latest, windows-latest, macos-latest]
3732
arch: [x86_64, aarch64]
38-
cibw_build: ["cp3{10,11,12,13,13t}-*"]
33+
cibw_build: ["cp3{10,11,12,13}-*", "cp313t-*"]
3934
p_ver: ["3.10-3.13+3.13t"]
4035
exclude:
4136
- os: windows-latest
@@ -60,6 +55,13 @@ jobs:
6055
if: ${{ matrix.arch == 'aarch64' }}
6156
name: Set up QEMU
6257

58+
- name: Setup free-threading variables
59+
shell: bash -l {0}
60+
run: |
61+
echo "CIBW_BEFORE_BUILD=pip install setuptools numpy" >> "$GITHUB_ENV"
62+
echo "CIBW_BEFORE_TEST=pip install pytest pytest-run-parallel" >> "$GITHUB_ENV"
63+
echo "CIBW_TEST_COMMAND=pytest --parallel-threads=4 numexpr/tests" >> "$GITHUB_ENV"
64+
6365
- name: Build wheels
6466
run: |
6567
python -m cibuildwheel --output-dir wheelhouse

0 commit comments

Comments
 (0)