@@ -109,20 +109,10 @@ jobs:
109109 python-version : ' 3.x'
110110 - name : Runner image version
111111 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
112- - name : Restore config.cache
113- uses : actions/cache@v4
114- with :
115- path : config.cache
116- # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
117- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
118112 - name : Install dependencies
119113 run : sudo ./.github/workflows/posix-deps-apt.sh
120114 - name : Add ccache to PATH
121115 run : echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
122- - name : Configure ccache action
123- uses : hendrikmuhs/ccache-action@v1.2
124- with :
125- save : false
126116 - name : Configure CPython
127117 run : |
128118 # Build Python with the libpython dynamic library
@@ -152,6 +142,9 @@ jobs:
152142 - name : Check for unsupported C global variables
153143 if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
154144 run : make check-c-globals
145+ - name : Check for undocumented C APIs
146+ run : make check-c-api-docs
147+
155148
156149 build-windows :
157150 name : >-
@@ -198,7 +191,7 @@ jobs:
198191 macOS
199192 ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
200193 needs : build-context
201- if : needs.build-context.outputs.run-tests == 'true'
194+ if : needs.build-context.outputs.run-macos == 'true'
202195 strategy :
203196 fail-fast : false
204197 matrix :
@@ -215,7 +208,6 @@ jobs:
215208 free-threading : true
216209 uses : ./.github/workflows/reusable-macos.yml
217210 with :
218- config_hash : ${{ needs.build-context.outputs.config-hash }}
219211 free-threading : ${{ matrix.free-threading }}
220212 os : ${{ matrix.os }}
221213
@@ -225,7 +217,7 @@ jobs:
225217 ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
226218 ${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
227219 needs : build-context
228- if : needs.build-context.outputs.run-tests == 'true'
220+ if : needs.build-context.outputs.run-ubuntu == 'true'
229221 strategy :
230222 fail-fast : false
231223 matrix :
@@ -247,7 +239,6 @@ jobs:
247239 bolt : true
248240 uses : ./.github/workflows/reusable-ubuntu.yml
249241 with :
250- config_hash : ${{ needs.build-context.outputs.config-hash }}
251242 bolt-optimizations : ${{ matrix.bolt }}
252243 free-threading : ${{ matrix.free-threading }}
253244 os : ${{ matrix.os }}
@@ -257,7 +248,7 @@ jobs:
257248 runs-on : ${{ matrix.os }}
258249 timeout-minutes : 60
259250 needs : build-context
260- if : needs.build-context.outputs.run-tests == 'true'
251+ if : needs.build-context.outputs.run-ubuntu == 'true'
261252 strategy :
262253 fail-fast : false
263254 matrix :
@@ -278,11 +269,6 @@ jobs:
278269 persist-credentials : false
279270 - name : Runner image version
280271 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
281- - name : Restore config.cache
282- uses : actions/cache@v4
283- with :
284- path : config.cache
285- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
286272 - name : Register gcc problem matcher
287273 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
288274 - name : Install dependencies
@@ -304,10 +290,6 @@ jobs:
304290 - name : Add ccache to PATH
305291 run : |
306292 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
307- - name : Configure ccache action
308- uses : hendrikmuhs/ccache-action@v1.2
309- with :
310- save : false
311293 - name : Configure CPython
312294 run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
313295 - name : Build CPython
@@ -322,7 +304,7 @@ jobs:
322304 runs-on : ${{ matrix.os }}
323305 timeout-minutes : 60
324306 needs : build-context
325- if : needs.build-context.outputs.run-tests == 'true'
307+ if : needs.build-context.outputs.run-ubuntu == 'true'
326308 strategy :
327309 fail-fast : false
328310 matrix :
@@ -339,11 +321,6 @@ jobs:
339321 persist-credentials : false
340322 - name : Runner image version
341323 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
342- - name : Restore config.cache
343- uses : actions/cache@v4
344- with :
345- path : config.cache
346- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
347324 - name : Register gcc problem matcher
348325 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
349326 - name : Install dependencies
@@ -370,10 +347,6 @@ jobs:
370347 - name : Add ccache to PATH
371348 run : |
372349 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
373- - name : Configure ccache action
374- uses : hendrikmuhs/ccache-action@v1.2
375- with :
376- save : false
377350 - name : Configure CPython
378351 run : |
379352 ./configure CFLAGS="-fdiagnostics-format=json" \
@@ -395,7 +368,7 @@ jobs:
395368 build-android :
396369 name : Android (${{ matrix.arch }})
397370 needs : build-context
398- if : needs.build-context.outputs.run-tests == 'true'
371+ if : needs.build-context.outputs.run-android == 'true'
399372 timeout-minutes : 60
400373 strategy :
401374 fail-fast : false
@@ -417,9 +390,9 @@ jobs:
417390 build-ios :
418391 name : iOS
419392 needs : build-context
420- if : needs.build-context.outputs.run-tests == 'true'
393+ if : needs.build-context.outputs.run-ios == 'true'
421394 timeout-minutes : 60
422- runs-on : macos-15
395+ runs-on : macos-14
423396 steps :
424397 - uses : actions/checkout@v4
425398 with :
@@ -432,25 +405,23 @@ jobs:
432405 # https://github.com/actions/runner-images/issues/12751.
433406 - name : Select Xcode version
434407 run : |
435- sudo xcode-select --switch /Applications/Xcode_16 .4.app
408+ sudo xcode-select --switch /Applications/Xcode_15 .4.app
436409
437410 - name : Build and test
438- run : python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e ,OS=18 .5'
411+ run : python3 Apple ci iOS --fast-ci --simulator 'iPhone SE (3rd generation) ,OS=17 .5'
439412
440413 build-wasi :
441414 name : ' WASI'
442415 needs : build-context
443- if : needs.build-context.outputs.run-tests == 'true'
416+ if : needs.build-context.outputs.run-wasi == 'true'
444417 uses : ./.github/workflows/reusable-wasi.yml
445- with :
446- config_hash : ${{ needs.build-context.outputs.config-hash }}
447418
448419 test-hypothesis :
449420 name : " Hypothesis tests on Ubuntu"
450421 runs-on : ubuntu-24.04
451422 timeout-minutes : 60
452423 needs : build-context
453- if : needs.build-context.outputs.run-tests == 'true'
424+ if : needs.build-context.outputs.run-ubuntu == 'true'
454425 env :
455426 OPENSSL_VER : 3.0.18
456427 PYTHONSTRICTEXTENSIONBUILD : 1
@@ -479,10 +450,6 @@ jobs:
479450 - name : Add ccache to PATH
480451 run : |
481452 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
482- - name : Configure ccache action
483- uses : hendrikmuhs/ccache-action@v1.2
484- with :
485- save : false
486453 - name : Setup directory envs for out-of-tree builds
487454 run : |
488455 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -493,11 +460,6 @@ jobs:
493460 run : sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
494461 - name : Runner image version
495462 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
496- - name : Restore config.cache
497- uses : actions/cache@v4
498- with :
499- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
500- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
501463 - name : Configure CPython out-of-tree
502464 working-directory : ${{ env.CPYTHON_BUILDDIR }}
503465 run : |
@@ -566,7 +528,7 @@ jobs:
566528 runs-on : ${{ matrix.os }}
567529 timeout-minutes : 60
568530 needs : build-context
569- if : needs.build-context.outputs.run-tests == 'true'
531+ if : needs.build-context.outputs.run-ubuntu == 'true'
570532 strategy :
571533 fail-fast : false
572534 matrix :
@@ -581,11 +543,6 @@ jobs:
581543 persist-credentials : false
582544 - name : Runner image version
583545 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
584- - name : Restore config.cache
585- uses : actions/cache@v4
586- with :
587- path : config.cache
588- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
589546 - name : Register gcc problem matcher
590547 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
591548 - name : Install dependencies
@@ -611,11 +568,6 @@ jobs:
611568 - name : Add ccache to PATH
612569 run : |
613570 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
614- - name : Configure ccache action
615- uses : hendrikmuhs/ccache-action@v1.2
616- with :
617- save : ${{ github.event_name == 'push' }}
618- max-size : " 200M"
619571 - name : Configure CPython
620572 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc
621573 - name : Build CPython
@@ -629,7 +581,7 @@ jobs:
629581 # ${{ '' } is a hack to nest jobs under the same sidebar category.
630582 name : Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
631583 needs : build-context
632- if : needs.build-context.outputs.run-tests == 'true'
584+ if : needs.build-context.outputs.run-ubuntu == 'true'
633585 strategy :
634586 fail-fast : false
635587 matrix :
@@ -647,26 +599,20 @@ jobs:
647599 uses : ./.github/workflows/reusable-san.yml
648600 with :
649601 sanitizer : ${{ matrix.sanitizer }}
650- config_hash : ${{ needs.build-context.outputs.config-hash }}
651602 free-threading : ${{ matrix.free-threading }}
652603
653604 cross-build-linux :
654605 name : Cross build Linux
655606 runs-on : ubuntu-latest
656607 timeout-minutes : 60
657608 needs : build-context
658- if : needs.build-context.outputs.run-tests == 'true'
609+ if : needs.build-context.outputs.run-ubuntu == 'true'
659610 steps :
660611 - uses : actions/checkout@v4
661612 with :
662613 persist-credentials : false
663614 - name : Runner image version
664615 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
665- - name : Restore config.cache
666- uses : actions/cache@v4
667- with :
668- path : config.cache
669- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
670616 - name : Register gcc problem matcher
671617 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
672618 - name : Set build dir
@@ -760,50 +706,39 @@ jobs:
760706 uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
761707 with :
762708 allowed-failures : >-
709+ build-ios,
763710 build-windows-msi,
764711 build-ubuntu-ssltests-awslc,
765712 build-ubuntu-ssltests-openssl,
766713 test-hypothesis,
767714 cifuzz,
768715 allowed-skips : >-
716+ ${{ !fromJSON(needs.build-context.outputs.run-docs) && 'check-docs,' || '' }}
769717 ${{
770- !fromJSON( needs.build-context.outputs.run-docs)
718+ needs.build-context.outputs.run-tests != 'true'
771719 && '
772- check-docs,
720+ check-autoconf-regen,
721+ check-generated-files,
773722 '
774723 || ''
775724 }}
725+ ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
726+ ${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
727+ ${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
776728 ${{
777- needs.build-context.outputs.run-tests != 'true'
729+ !fromJSON( needs.build-context.outputs.run-ubuntu)
778730 && '
779- check-autoconf-regen,
780- check-generated-files,
781- build-macos,
782731 build-ubuntu,
783732 build-ubuntu-ssltests-awslc,
784733 build-ubuntu-ssltests-openssl,
785- build-android,
786- build-ios,
787- build-wasi,
788734 test-hypothesis,
789735 build-asan,
790736 build-san,
791737 cross-build-linux,
792738 '
793739 || ''
794740 }}
795- ${{
796- !fromJSON(needs.build-context.outputs.run-windows-tests)
797- && '
798- build-windows,
799- '
800- || ''
801- }}
802- ${{
803- !fromJSON(needs.build-context.outputs.run-ci-fuzz)
804- && '
805- cifuzz,
806- '
807- || ''
808- }}
741+ ${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
742+ ${{ !fromJSON(needs.build-context.outputs.run-ios) && 'build-ios,' || '' }}
743+ ${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
809744 jobs : ${{ toJSON(needs) }}
0 commit comments