@@ -154,20 +154,10 @@ jobs:
154154 python-version : ' 3.x'
155155 - name : Runner image version
156156 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
157- - name : Restore config.cache
158- uses : actions/cache@v4
159- with :
160- path : config.cache
161- # Include env.pythonLocation in key to avoid changes in environment when setup-python updates Python
162- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}-${{ env.pythonLocation }}
163157 - name : Install dependencies
164158 run : sudo ./.github/workflows/posix-deps-apt.sh
165159 - name : Add ccache to PATH
166160 run : echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
167- - name : Configure ccache action
168- uses : hendrikmuhs/ccache-action@v1.2
169- with :
170- save : false
171161 - name : Configure CPython
172162 run : |
173163 # Build Python with the libpython dynamic library
@@ -197,6 +187,9 @@ jobs:
197187 - name : Check for unsupported C global variables
198188 if : github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
199189 run : make check-c-globals
190+ - name : Check for undocumented C APIs
191+ run : make check-c-api-docs
192+
200193
201194 build-windows :
202195 name : >-
@@ -251,7 +244,7 @@ jobs:
251244 macOS
252245 ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
253246 needs : build-context
254- if : needs.build-context.outputs.run-tests == 'true'
247+ if : needs.build-context.outputs.run-macos == 'true'
255248 strategy :
256249 fail-fast : false
257250 matrix :
@@ -268,7 +261,6 @@ jobs:
268261 free-threading : true
269262 uses : ./.github/workflows/reusable-macos.yml
270263 with :
271- config_hash : ${{ needs.build-context.outputs.config-hash }}
272264 free-threading : ${{ matrix.free-threading }}
273265 os : ${{ matrix.os }}
274266
@@ -277,7 +269,7 @@ jobs:
277269 Ubuntu
278270 ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
279271 needs : build-context
280- if : needs.build-context.outputs.run-tests == 'true'
272+ if : needs.build-context.outputs.run-ubuntu == 'true'
281273 strategy :
282274 fail-fast : false
283275 matrix :
@@ -286,15 +278,14 @@ jobs:
286278 - true
287279 uses : ./.github/workflows/reusable-ubuntu.yml
288280 with :
289- config_hash : ${{ needs.build-context.outputs.config-hash }}
290281 free-threading : ${{ matrix.free-threading }}
291282
292283 build-ubuntu-ssltests :
293284 name : ' Ubuntu SSL tests with OpenSSL'
294285 runs-on : ${{ matrix.os }}
295286 timeout-minutes : 60
296287 needs : build-context
297- if : needs.build-context.outputs.run-tests == 'true'
288+ if : needs.build-context.outputs.run-ubuntu == 'true'
298289 strategy :
299290 fail-fast : false
300291 matrix :
@@ -314,11 +305,6 @@ jobs:
314305 persist-credentials : false
315306 - name : Runner image version
316307 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
317- - name : Restore config.cache
318- uses : actions/cache@v4
319- with :
320- path : config.cache
321- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
322308 - name : Register gcc problem matcher
323309 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
324310 - name : Install dependencies
@@ -340,10 +326,6 @@ jobs:
340326 - name : Add ccache to PATH
341327 run : |
342328 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
343- - name : Configure ccache action
344- uses : hendrikmuhs/ccache-action@v1.2
345- with :
346- save : false
347329 - name : Configure CPython
348330 run : ./configure --config-cache --with-pydebug --with-openssl=$OPENSSL_DIR
349331 - name : Build CPython
@@ -356,7 +338,7 @@ jobs:
356338 build-android :
357339 name : Android (${{ matrix.arch }})
358340 needs : build-context
359- if : needs.build-context.outputs.run-tests == 'true'
341+ if : needs.build-context.outputs.run-android == 'true'
360342 timeout-minutes : 60
361343 strategy :
362344 fail-fast : false
@@ -378,17 +360,15 @@ jobs:
378360 build-wasi :
379361 name : ' WASI'
380362 needs : build-context
381- if : needs.build-context.outputs.run-tests == 'true'
363+ if : needs.build-context.outputs.run-wasi == 'true'
382364 uses : ./.github/workflows/reusable-wasi.yml
383- with :
384- config_hash : ${{ needs.build-context.outputs.config-hash }}
385365
386366 test-hypothesis :
387367 name : " Hypothesis tests on Ubuntu"
388368 runs-on : ubuntu-24.04
389369 timeout-minutes : 60
390370 needs : build-context
391- if : needs.build-context.outputs.run-tests == 'true'
371+ if : needs.build-context.outputs.run-ubuntu == 'true'
392372 env :
393373 OPENSSL_VER : 3.0.18
394374 PYTHONSTRICTEXTENSIONBUILD : 1
@@ -417,10 +397,6 @@ jobs:
417397 - name : Add ccache to PATH
418398 run : |
419399 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
420- - name : Configure ccache action
421- uses : hendrikmuhs/ccache-action@v1.2
422- with :
423- save : false
424400 - name : Setup directory envs for out-of-tree builds
425401 run : |
426402 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -431,11 +407,6 @@ jobs:
431407 run : sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
432408 - name : Runner image version
433409 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
434- - name : Restore config.cache
435- uses : actions/cache@v4
436- with :
437- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
438- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
439410 - name : Configure CPython out-of-tree
440411 working-directory : ${{ env.CPYTHON_BUILDDIR }}
441412 run : |
@@ -503,7 +474,7 @@ jobs:
503474 runs-on : ${{ matrix.os }}
504475 timeout-minutes : 60
505476 needs : build-context
506- if : needs.build-context.outputs.run-tests == 'true'
477+ if : needs.build-context.outputs.run-ubuntu == 'true'
507478 strategy :
508479 fail-fast : false
509480 matrix :
@@ -518,11 +489,6 @@ jobs:
518489 persist-credentials : false
519490 - name : Runner image version
520491 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
521- - name : Restore config.cache
522- uses : actions/cache@v4
523- with :
524- path : config.cache
525- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
526492 - name : Register gcc problem matcher
527493 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
528494 - name : Install dependencies
@@ -548,11 +514,6 @@ jobs:
548514 - name : Add ccache to PATH
549515 run : |
550516 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
551- - name : Configure ccache action
552- uses : hendrikmuhs/ccache-action@v1.2
553- with :
554- save : ${{ github.event_name == 'push' }}
555- max-size : " 200M"
556517 - name : Configure CPython
557518 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc
558519 - name : Build CPython
@@ -566,7 +527,7 @@ jobs:
566527 # ${{ '' } is a hack to nest jobs under the same sidebar category.
567528 name : Sanitizers${{ '' }} # zizmor: ignore[obfuscation]
568529 needs : build-context
569- if : needs.build-context.outputs.run-tests == 'true'
530+ if : needs.build-context.outputs.run-ubuntu == 'true'
570531 strategy :
571532 fail-fast : false
572533 matrix :
@@ -580,7 +541,6 @@ jobs:
580541 uses : ./.github/workflows/reusable-san.yml
581542 with :
582543 sanitizer : ${{ matrix.sanitizer }}
583- config_hash : ${{ needs.build-context.outputs.config-hash }}
584544 free-threading : ${{ matrix.free-threading }}
585545
586546 # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
@@ -637,7 +597,6 @@ jobs:
637597 - build-macos
638598 - build-ubuntu
639599 - build-ubuntu-ssltests
640- - build-android
641600 - build-wasi
642601 - test-hypothesis
643602 - build-asan
@@ -650,46 +609,35 @@ jobs:
650609 uses : re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe
651610 with :
652611 allowed-failures : >-
612+ build-android,
653613 build-windows-msi,
654614 build-ubuntu-ssltests,
655615 test-hypothesis,
656616 cifuzz,
657617 allowed-skips : >-
618+ ${{ !fromJSON(needs.build-context.outputs.run-docs) && 'check-docs,' || '' }}
658619 ${{
659- !fromJSON( needs.build-context.outputs.run-docs)
620+ needs.build-context.outputs.run-tests != 'true'
660621 && '
661- check-docs,
622+ check-autoconf-regen,
623+ check-generated-files,
662624 '
663625 || ''
664626 }}
627+ ${{ !fromJSON(needs.build-context.outputs.run-windows-tests) && 'build-windows,' || '' }}
628+ ${{ !fromJSON(needs.build-context.outputs.run-ci-fuzz) && 'cifuzz,' || '' }}
629+ ${{ !fromJSON(needs.build-context.outputs.run-macos) && 'build-macos,' || '' }}
665630 ${{
666- needs.build-context.outputs.run-tests != 'true'
631+ !fromJSON( needs.build-context.outputs.run-ubuntu)
667632 && '
668- check-autoconf-regen,
669- check-generated-files,
670- build-macos,
671633 build-ubuntu,
672634 build-ubuntu-ssltests,
673- build-android,
674- build-wasi,
675635 test-hypothesis,
676636 build-asan,
677637 build-san,
678638 '
679639 || ''
680640 }}
681- ${{
682- !fromJSON(needs.build-context.outputs.run-windows-tests)
683- && '
684- build-windows,
685- '
686- || ''
687- }}
688- ${{
689- !fromJSON(needs.build-context.outputs.run-ci-fuzz)
690- && '
691- cifuzz,
692- '
693- || ''
694- }}
641+ ${{ !fromJSON(needs.build-context.outputs.run-android) && 'build-android,' || '' }}
642+ ${{ !fromJSON(needs.build-context.outputs.run-wasi) && 'build-wasi,' || '' }}
695643 jobs : ${{ toJSON(needs) }}
0 commit comments