@@ -276,17 +276,19 @@ jobs:
276276 env :
277277 RUST_BACKTRACE : full
278278 name : Run snippets and cpython tests
279- runs-on : ${{ matrix.platform .os }}
279+ runs-on : ${{ matrix.job .os }}
280280 strategy :
281281 matrix :
282- platform :
282+ job :
283283 - os : macos-latest
284284 env_polluting_tests : " "
285285 skips : " "
286286 - os : ubuntu-latest
287+ cargo_args : " --features=jit"
287288 env_polluting_tests : " "
288289 skips : " "
289290 - os : windows-2025
291+ cargo_args : " --features=jit"
290292 env_polluting_tests : " "
291293 # Skip additional tests on Windows. They are checked on Linux and MacOS.
292294 # test_pathlib: panic by surrogate chars
@@ -313,13 +315,11 @@ jobs:
313315 run : brew install autoconf automake libtool openssl@3
314316 if : runner.os == 'macOS'
315317
316- - name : build rustpython
317- run : cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }}
318- if : runner.os == 'macOS'
319-
320- - name : build rustpython
321- run : cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }},jit
322- if : runner.os != 'macOS'
318+ - name : Build RustPython
319+ run : |
320+ cargo build --release --verbose --features=threading ${{ env.CARGO_ARGS }} ${{ env.EXTRA_CARGO_ARGS }}
321+ env :
322+ EXTRA_CARGO_ARGS : ${{ matrix.job.cargo_args || '' }}
323323
324324 - name : run snippets
325325 run : python -m pip install -r requirements.txt && pytest -v
@@ -335,15 +335,15 @@ jobs:
335335
336336 - name : Run CPython platform-dependent tests
337337 run : |
338- target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ matrix.target .skips }}
338+ target/release/rustpython -m test -j 1 -u all --slowest --fail-env-changed --timeout 600 -v -x ${{ env.PLATFORM_INDEPENDENT_TESTS }} ${{ matrix.job .skips }}
339339 env :
340340 RUSTPYTHON_SKIP_ENV_POLLUTERS : true
341341 timeout-minutes : 60
342342
343343 - name : Run cpython tests to check if env polluters have stopped polluting
344344 shell : bash
345345 run : |
346- for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ matrix.platform .env_polluting_tests }}; do
346+ for thing in ${{ env.ENV_POLLUTING_TESTS_COMMON }} ${{ matrix.job .env_polluting_tests }}; do
347347 for i in $(seq 1 10); do
348348 set +e
349349 target/release/rustpython -m test -j 1 --slowest --fail-env-changed --timeout 600 -v ${thing}
@@ -356,7 +356,7 @@ jobs:
356356 done
357357 if [ ${exit_code} -ne 3 ]; then
358358 echo "Test ${thing} is no longer polluting the environment after ${i} attempts!"
359- echo "Please remove ${thing} from either ENV_POLLUTING_TESTS_COMMON or matrix.platform .env_polluting_tests in '.github/workflows/ci.yaml'."
359+ echo "Please remove ${thing} from either ENV_POLLUTING_TESTS_COMMON or matrix.job .env_polluting_tests in '.github/workflows/ci.yaml'."
360360 echo "Please also remove the skip decorators that include the word 'POLLUTERS' in ${thing}."
361361 if [ ${exit_code} -ne 0 ]; then
362362 echo "Test ${thing} failed with exit code ${exit_code}."
0 commit comments