@@ -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
@@ -278,11 +268,6 @@ jobs:
278268 persist-credentials : false
279269 - name : Runner image version
280270 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 }}
286271 - name : Register gcc problem matcher
287272 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
288273 - name : Install dependencies
@@ -304,10 +289,6 @@ jobs:
304289 - name : Add ccache to PATH
305290 run : |
306291 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
311292 - name : Configure CPython
312293 run : ./configure CFLAGS="-fdiagnostics-format=json" --config-cache --enable-slower-safety --with-pydebug --with-openssl="$OPENSSL_DIR"
313294 - name : Build CPython
@@ -339,11 +320,6 @@ jobs:
339320 persist-credentials : false
340321 - name : Runner image version
341322 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 }}
347323 - name : Register gcc problem matcher
348324 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
349325 - name : Install dependencies
@@ -370,10 +346,6 @@ jobs:
370346 - name : Add ccache to PATH
371347 run : |
372348 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
377349 - name : Configure CPython
378350 run : |
379351 ./configure CFLAGS="-fdiagnostics-format=json" \
@@ -414,6 +386,29 @@ jobs:
414386 - name : Build and test
415387 run : ./Android/android.py ci --fast-ci ${{ matrix.arch }}-linux-android
416388
389+ build-ios :
390+ name : iOS
391+ needs : build-context
392+ if : needs.build-context.outputs.run-tests == 'true'
393+ timeout-minutes : 60
394+ runs-on : macos-15
395+ steps :
396+ - uses : actions/checkout@v4
397+ with :
398+ persist-credentials : false
399+
400+ # GitHub recommends explicitly selecting the desired Xcode version:
401+ # https://github.com/actions/runner-images/issues/12541#issuecomment-3083850140
402+ # This became a necessity as a result of
403+ # https://github.com/actions/runner-images/issues/12541 and
404+ # https://github.com/actions/runner-images/issues/12751.
405+ - name : Select Xcode version
406+ run : |
407+ sudo xcode-select --switch /Applications/Xcode_16.4.app
408+
409+ - name : Build and test
410+ run : python3 Apple ci iOS --fast-ci --simulator 'iPhone 16e,OS=18.5'
411+
417412 build-wasi :
418413 name : ' WASI'
419414 needs : build-context
@@ -456,10 +451,6 @@ jobs:
456451 - name : Add ccache to PATH
457452 run : |
458453 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
459- - name : Configure ccache action
460- uses : hendrikmuhs/ccache-action@v1.2
461- with :
462- save : false
463454 - name : Setup directory envs for out-of-tree builds
464455 run : |
465456 echo "CPYTHON_RO_SRCDIR=$(realpath -m "${GITHUB_WORKSPACE}"/../cpython-ro-srcdir)" >> "$GITHUB_ENV"
@@ -470,11 +461,6 @@ jobs:
470461 run : sudo mount --bind -o ro "$GITHUB_WORKSPACE" "$CPYTHON_RO_SRCDIR"
471462 - name : Runner image version
472463 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 }}
478464 - name : Configure CPython out-of-tree
479465 working-directory : ${{ env.CPYTHON_BUILDDIR }}
480466 run : |
@@ -558,11 +544,6 @@ jobs:
558544 persist-credentials : false
559545 - name : Runner image version
560546 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 }}
566547 - name : Register gcc problem matcher
567548 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
568549 - name : Install dependencies
@@ -588,11 +569,6 @@ jobs:
588569 - name : Add ccache to PATH
589570 run : |
590571 echo "PATH=/usr/lib/ccache:$PATH" >> "$GITHUB_ENV"
591- - name : Configure ccache action
592- uses : hendrikmuhs/ccache-action@v1.2
593- with :
594- save : ${{ github.event_name == 'push' }}
595- max-size : " 200M"
596572 - name : Configure CPython
597573 run : ./configure --config-cache --with-address-sanitizer --without-pymalloc
598574 - name : Build CPython
@@ -639,11 +615,6 @@ jobs:
639615 persist-credentials : false
640616 - name : Runner image version
641617 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 }}
647618 - name : Register gcc problem matcher
648619 run : echo "::add-matcher::.github/problem-matchers/gcc.json"
649620 - name : Set build dir
@@ -723,6 +694,7 @@ jobs:
723694 - build-ubuntu-ssltests-awslc
724695 - build-ubuntu-ssltests-openssl
725696 - build-android
697+ - build-ios
726698 - build-wasi
727699 - test-hypothesis
728700 - build-asan
@@ -759,6 +731,7 @@ jobs:
759731 build-ubuntu-ssltests-awslc,
760732 build-ubuntu-ssltests-openssl,
761733 build-android,
734+ build-ios,
762735 build-wasi,
763736 test-hypothesis,
764737 build-asan,
0 commit comments