88 push :
99 branches :
1010 - ' main'
11- - ' 3.12'
12- - ' 3.11'
13- - ' 3.10'
14- - ' 3.9'
15- - ' 3.8'
11+ - ' 3.*'
1612 pull_request :
1713 branches :
1814 - ' main'
19- - ' 3.12'
20- - ' 3.11'
21- - ' 3.10'
22- - ' 3.9'
23- - ' 3.8'
15+ - ' 3.*'
2416
2517permissions :
2618 contents : read
9789 - name : Get a list of the changed documentation-related files
9890 if : github.event_name == 'pull_request'
9991 id : changed-docs-files
100- uses : Ana06/get-changed-files@v2.2 .0
92+ uses : Ana06/get-changed-files@v2.3 .0
10193 with :
10294 filter : |
10395 Doc/**
@@ -137,6 +129,7 @@ jobs:
137129 uses : actions/cache@v4
138130 with :
139131 path : config.cache
132+ # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
140133 key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}-${{ env.pythonLocation }}
141134 - name : Install Dependencies
142135 run : sudo ./.github/workflows/posix-deps-apt.sh
@@ -206,6 +199,9 @@ jobs:
206199 uses : ./.github/workflows/reusable-macos.yml
207200 with :
208201 config_hash : ${{ needs.check_source.outputs.config_hash }}
202+ # Cirrus and macos-14 are M1, macos-13 is default GHA Intel.
203+ # Cirrus used for upstream, macos-14 for forks.
204+ os-matrix : ' ["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14", "macos-13"]'
209205
210206 build_macos_free_threading :
211207 name : ' macOS (free-threading)'
@@ -215,6 +211,9 @@ jobs:
215211 with :
216212 config_hash : ${{ needs.check_source.outputs.config_hash }}
217213 free-threading : true
214+ # Cirrus and macos-14 are M1.
215+ # Cirrus used for upstream, macos-14 for forks.
216+ os-matrix : ' ["ghcr.io/cirruslabs/macos-runner:sonoma", "macos-14"]'
218217
219218 build_ubuntu :
220219 name : ' Ubuntu'
@@ -245,7 +244,7 @@ jobs:
245244
246245 build_ubuntu_ssltests :
247246 name : ' Ubuntu SSL tests with OpenSSL'
248- runs-on : ubuntu-20 .04
247+ runs-on : ubuntu-22 .04
249248 timeout-minutes : 60
250249 needs : check_source
251250 if : needs.check_source.outputs.run_tests == 'true'
@@ -301,9 +300,17 @@ jobs:
301300 - name : SSL tests
302301 run : ./python Lib/test/ssltests.py
303302
303+ build_wasi :
304+ name : ' WASI'
305+ needs : check_source
306+ if : needs.check_source.outputs.run_tests == 'true'
307+ uses : ./.github/workflows/reusable-wasi.yml
308+ with :
309+ config_hash : ${{ needs.check_source.outputs.config_hash }}
310+
304311 test_hypothesis :
305312 name : " Hypothesis tests on Ubuntu"
306- runs-on : ubuntu-20 .04
313+ runs-on : ubuntu-22 .04
307314 timeout-minutes : 60
308315 needs : check_source
309316 if : needs.check_source.outputs.run_tests == 'true' && needs.check_source.outputs.run_hypothesis == 'true'
@@ -383,7 +390,7 @@ jobs:
383390 id : cache-hypothesis-database
384391 uses : actions/cache@v4
385392 with :
386- path : ./ hypothesis
393+ path : ${{ env.CPYTHON_BUILDDIR }}/. hypothesis/
387394 key : hypothesis-database-${{ github.head_ref || github.run_id }}
388395 restore-keys : |
389396 - hypothesis-database-
@@ -411,12 +418,12 @@ jobs:
411418 if : always()
412419 with :
413420 name : hypothesis-example-db
414- path : .hypothesis/examples/
421+ path : ${{ env.CPYTHON_BUILDDIR }}/ .hypothesis/examples/
415422
416423
417424 build_asan :
418425 name : ' Address sanitizer'
419- runs-on : ubuntu-20 .04
426+ runs-on : ubuntu-22 .04
420427 timeout-minutes : 60
421428 needs : check_source
422429 if : needs.check_source.outputs.run_tests == 'true'
@@ -472,6 +479,28 @@ jobs:
472479 - name : Tests
473480 run : xvfb-run make test
474481
482+ build_tsan :
483+ name : ' Thread sanitizer'
484+ needs : check_source
485+ if : needs.check_source.outputs.run_tests == 'true'
486+ uses : ./.github/workflows/reusable-tsan.yml
487+ with :
488+ config_hash : ${{ needs.check_source.outputs.config_hash }}
489+ options : ./configure --config-cache --with-thread-sanitizer --with-pydebug
490+ suppressions_path : Tools/tsan/supressions.txt
491+ tsan_logs_artifact_name : tsan-logs-default
492+
493+ build_tsan_free_threading :
494+ name : ' Thread sanitizer (free-threading)'
495+ needs : check_source
496+ if : needs.check_source.outputs.run_tests == 'true'
497+ uses : ./.github/workflows/reusable-tsan.yml
498+ with :
499+ config_hash : ${{ needs.check_source.outputs.config_hash }}
500+ options : ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
501+ suppressions_path : Tools/tsan/suppressions_free_threading.txt
502+ tsan_logs_artifact_name : tsan-logs-free-threading
503+
475504 # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
476505 cifuzz :
477506 name : CIFuzz
@@ -525,10 +554,13 @@ jobs:
525554 - build_ubuntu
526555 - build_ubuntu_free_threading
527556 - build_ubuntu_ssltests
557+ - build_wasi
528558 - build_windows
529559 - build_windows_free_threading
530560 - test_hypothesis
531561 - build_asan
562+ - build_tsan
563+ - build_tsan_free_threading
532564 - cifuzz
533565
534566 runs-on : ubuntu-latest
@@ -558,9 +590,12 @@ jobs:
558590 build_ubuntu,
559591 build_ubuntu_free_threading,
560592 build_ubuntu_ssltests,
593+ build_wasi,
561594 build_windows,
562595 build_windows_free_threading,
563596 build_asan,
597+ build_tsan,
598+ build_tsan_free_threading,
564599 '
565600 || ''
566601 }}
0 commit comments