@@ -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/[email protected] 124- with :
125- save : false
126116 - name : Configure CPython
127117 run : |
128118 # Build Python with the libpython dynamic library
@@ -215,7 +205,6 @@ jobs:
215205 free-threading : true
216206 uses : ./.github/workflows/reusable-macos.yml
217207 with :
218- config_hash : ${{ needs.build-context.outputs.config-hash }}
219208 free-threading : ${{ matrix.free-threading }}
220209 os : ${{ matrix.os }}
221210
@@ -247,7 +236,6 @@ jobs:
247236 bolt : true
248237 uses : ./.github/workflows/reusable-ubuntu.yml
249238 with :
250- config_hash : ${{ needs.build-context.outputs.config-hash }}
251239 bolt-optimizations : ${{ matrix.bolt }}
252240 free-threading : ${{ matrix.free-threading }}
253241 os : ${{ matrix.os }}
@@ -278,11 +266,6 @@ jobs:
278266 persist-credentials : false
279267 - name : Runner image version
280268 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 }}
286269 - name : Register gcc problem matcher
287270 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
288271 - name : Install dependencies
@@ -304,10 +287,6 @@ jobs:
304287 - name : Add ccache to PATH
305288 run : |
306289 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
307- - name : Configure ccache action
308- uses :
hendrikmuhs/[email protected] 309- with :
310- save : false
311290 - name : Configure CPython
312291 run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
313292 - name : Build CPython
@@ -339,11 +318,6 @@ jobs:
339318 persist-credentials : false
340319 - name : Runner image version
341320 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 }}
347321 - name : Register gcc problem matcher
348322 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
349323 - name : Install dependencies
@@ -370,10 +344,6 @@ jobs:
370344 - name : Add ccache to PATH
371345 run : |
372346 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
373- - name : Configure ccache action
374- uses :
hendrikmuhs/[email protected] 375- with :
376- save : false
377347 - name : Configure CPython
378348 run : |
379349 ./configure CFLAGS="-fdiagnostics-format=json" \
@@ -414,13 +384,34 @@ jobs:
414384 - name : Build and test
415385 run : ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
416386
387+ build-ios :
388+ name : iOS
389+ needs : build-context
390+ if : needs.build-context.outputs.run-tests == 'true'
391+ timeout-minutes : 60
392+ runs-on : macos-15
393+ steps :
394+ - uses : actions/checkout@v4
395+ with :
396+ persist-credentials : false
397+
398+ # GitHub recommends explicitly selecting the desired Xcode version:
399+ # https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
400+ # This became a necessity as a result of
401+ # https://github.com/actions/runner-images/issues/12541 and
402+ # https://github.com/actions/runner-images/issues/12751.
403+ - name : Select Xcode version
404+ run : |
405+ sudo xcode-select --switch /Applications/Xcode_16.4.app
406+
407+ - name : Build and test
408+ run : python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e,OS=18.5'
409+
417410 build-wasi :
418411 name : ' WASI'
419412 needs : build-context
420413 if : needs.build-context.outputs.run-tests == 'true'
421414 uses : ./.github/workflows/reusable-wasi.yml
422- with :
423- config_hash : ${{ needs.build-context.outputs.config-hash }}
424415
425416 test-hypothesis :
426417 name : " Hypothesis tests on Ubuntu"
@@ -456,10 +447,6 @@ jobs:
456447 - name : Add ccache to PATH
457448 run : |
458449 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
459- - name : Configure ccache action
460- uses :
hendrikmuhs/[email protected] 461- with :
462- save : false
463450 - name : Setup directory envs for out-of-tree builds
464451 run : |
465452 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -470,11 +457,6 @@ jobs:
470457 run : sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
471458 - name : Runner image version
472459 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
473- - name : Restore config.cache
474- uses : actions/cache@v4
475- with :
476- path : ${{ env.CPYTHON_BUILDDIR }}/config.cache
477- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
478460 - name : Configure CPython out-of-tree
479461 working-directory : ${{ env.CPYTHON_BUILDDIR }}
480462 run : |
@@ -558,11 +540,6 @@ jobs:
558540 persist-credentials : false
559541 - name : Runner image version
560542 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
561- - name : Restore config.cache
562- uses : actions/cache@v4
563- with :
564- path : config.cache
565- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
566543 - name : Register gcc problem matcher
567544 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
568545 - name : Install dependencies
@@ -588,11 +565,6 @@ jobs:
588565 - name : Add ccache to PATH
589566 run : |
590567 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
591- - name : Configure ccache action
592- uses :
hendrikmuhs/[email protected] 593- with :
594- save : ${{ github.event_name == 'push' }}
595- max-size : " 200M"
596568 - name : Configure CPython
597569 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc
598570 - name : Build CPython
@@ -624,7 +596,6 @@ jobs:
624596 uses : ./.github/workflows/reusable-san.yml
625597 with :
626598 sanitizer : ${{ matrix.sanitizer }}
627- config_hash : ${{ needs.build-context.outputs.config-hash }}
628599 free-threading : ${{ matrix.free-threading }}
629600
630601 cross-build-linux :
@@ -639,11 +610,6 @@ jobs:
639610 persist-credentials : false
640611 - name : Runner image version
641612 run : echo "IMAGE_OS_VERSION=${ImageOS}-${ImageVersion}" >> "$GITHUB_ENV"
642- - name : Restore config.cache
643- uses : actions/cache@v4
644- with :
645- path : config.cache
646- key : ${{ github.job }}-${{ env.IMAGE_OS_VERSION }}-${{ needs.build-context.outputs.config-hash }}
647613 - name : Register gcc problem matcher
648614 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
649615 - name : Set build dir
@@ -723,6 +689,7 @@ jobs:
723689 - build-ubuntu-ssltests-awslc
724690 - build-ubuntu-ssltests-openssl
725691 - build-android
692+ - build-ios
726693 - build-wasi
727694 - test-hypothesis
728695 - build-asan
@@ -759,6 +726,7 @@ jobs:
759726 build-ubuntu-ssltests-awslc,
760727 build-ubuntu-ssltests-openssl,
761728 build-android,
729+ build-ios,
762730 build-wasi,
763731 test-hypothesis,
764732 build-asan,
0 commit comments