From 30e800adb10e75da4726a176df7ff58825872874 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Fri, 19 Sep 2025 10:24:34 +0100 Subject: [PATCH 01/10] run x86 builds under rosetta --- .github/workflows/jit.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 52f7d0d2b3df95..dd8fbd65430e0a 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -60,7 +60,7 @@ jobs: - i686-pc-windows-msvc/msvc - x86_64-pc-windows-msvc/msvc - aarch64-pc-windows-msvc/msvc - - x86_64-apple-darwin/clang + - x86_64-apple-darwin-rosetta/clang - aarch64-apple-darwin/clang - x86_64-unknown-linux-gnu/gcc - aarch64-unknown-linux-gnu/gcc @@ -79,9 +79,9 @@ jobs: - target: aarch64-pc-windows-msvc/msvc architecture: ARM64 runner: windows-11-arm - - target: x86_64-apple-darwin/clang + - target: x86_64-apple-darwin-rosetta/clang architecture: x86_64 - runner: macos-13 + runner: macos-14 - target: aarch64-apple-darwin/clang architecture: aarch64 runner: macos-14 @@ -122,7 +122,13 @@ jobs: export CFLAGS_JIT='-Werror=unguarded-availability' export MACOSX_DEPLOYMENT_TARGET=10.15 ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }} - make all --jobs 4 + # Use Rosetta for x86_64 builds on ARM runners because of + # the deprecation of x86_64 support for GitHub-hosted macOS runners + if [[ "${{ matrix.architecture }}" == "x86_64" && "$(uname -m)" == "arm64" ]]; then + arch -x86_64 make all --jobs 4 + else + make all --jobs 4 + fi ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - name: Linux From f77509a17d66a7e1f05bccd147878af3d8f892be Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 23 Sep 2025 16:09:47 -0500 Subject: [PATCH 02/10] bump to new macos 15 intel runner --- .github/workflows/jit.yml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index dd8fbd65430e0a..0ba877a30260f2 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -79,9 +79,9 @@ jobs: - target: aarch64-pc-windows-msvc/msvc architecture: ARM64 runner: windows-11-arm - - target: x86_64-apple-darwin-rosetta/clang + - target: x86_64-apple-darwin/clang architecture: x86_64 - runner: macos-14 + runner: macos-15-intel - target: aarch64-apple-darwin/clang architecture: aarch64 runner: macos-14 @@ -122,13 +122,7 @@ jobs: export CFLAGS_JIT='-Werror=unguarded-availability' export MACOSX_DEPLOYMENT_TARGET=10.15 ./configure --enable-experimental-jit --enable-universalsdk --with-universal-archs=universal2 ${{ matrix.debug && '--with-pydebug' || '' }} - # Use Rosetta for x86_64 builds on ARM runners because of - # the deprecation of x86_64 support for GitHub-hosted macOS runners - if [[ "${{ matrix.architecture }}" == "x86_64" && "$(uname -m)" == "arm64" ]]; then - arch -x86_64 make all --jobs 4 - else - make all --jobs 4 - fi + make all --jobs 4 ./python.exe -m test --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - name: Linux From ad2d4803e4ebb5ffa712ec65947be2d6012364a3 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Tue, 23 Sep 2025 16:10:12 -0500 Subject: [PATCH 03/10] oopsie --- .github/workflows/jit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 0ba877a30260f2..7c801b9f810b03 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -60,7 +60,7 @@ jobs: - i686-pc-windows-msvc/msvc - x86_64-pc-windows-msvc/msvc - aarch64-pc-windows-msvc/msvc - - x86_64-apple-darwin-rosetta/clang + - x86_64-apple-darwin/clang - aarch64-apple-darwin/clang - x86_64-unknown-linux-gnu/gcc - aarch64-unknown-linux-gnu/gcc From a673930e690908580493ae64eb5a6815bee98de5 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Thu, 2 Oct 2025 09:15:18 -0500 Subject: [PATCH 04/10] apply code review requests --- .github/actionlint.yaml | 2 +- .github/workflows/build.yml | 6 +++--- .github/workflows/jit.yml | 5 +++-- .github/workflows/reusable-macos.yml | 6 +++--- .github/workflows/tail-call.yml | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index 68aae196357414..a139f3dd197ed8 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,6 +1,6 @@ self-hosted-runner: # Pending https://github.com/rhysd/actionlint/issues/533 - labels: ["windows-11-arm"] + labels: ["windows-11-arm", "macos-15-intel"] config-variables: null diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 83a668fc720a90..1b1ad360e5a9b6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -202,13 +202,13 @@ jobs: strategy: fail-fast: false matrix: - # Cirrus and macos-14 are M1, macos-13 is default GHA Intel. + # Cirrus and macos-14 are M1, macos-15 is default GHA Intel. # macOS 13 only runs tests against the GIL-enabled CPython. # Cirrus used for upstream, macos-14 for forks. os: - ghcr.io/cirruslabs/macos-runner:sonoma - macos-14 - - macos-13 + - macos-15 is-fork: # only used for the exclusion trick - ${{ github.repository_owner != 'python' }} free-threading: @@ -219,7 +219,7 @@ jobs: is-fork: true - os: macos-14 is-fork: false - - os: macos-13 + - os: macos-15 free-threading: true uses: ./.github/workflows/reusable-macos.yml with: diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 7c801b9f810b03..882b2d45a52157 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -108,8 +108,9 @@ jobs: # The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966. # This is a bug in the macOS runner image where the pre-installed Python is installed in the same - # directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes - # the symlink to the pre-installed Python so that the Homebrew Python is used instead. + # directory as the Homebrew Python, which causes the build to fail for macos-15 + # (was 13, see if bug still exists?) This line removes the symlink to the pre-installed Python so + # that the Homebrew Python is used instead. - name: macOS if: runner.os == 'macOS' run: | diff --git a/.github/workflows/reusable-macos.yml b/.github/workflows/reusable-macos.yml index de0c40221364ad..07d9431ea99b5b 100644 --- a/.github/workflows/reusable-macos.yml +++ b/.github/workflows/reusable-macos.yml @@ -60,15 +60,15 @@ jobs: --prefix=/opt/python-dev \ --with-openssl="$(brew --prefix openssl@3.0)" - name: Build CPython - if : ${{ inputs.free-threading || inputs.os != 'macos-13' }} + if : ${{ inputs.free-threading || inputs.os != 'macos-15' }} run: gmake -j8 - name: Build CPython for compiler warning check - if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }} + if : ${{ !inputs.free-threading && inputs.os == 'macos-15' }} run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt - name: Display build info run: make pythoninfo - name: Check compiler warnings - if : ${{ !inputs.free-threading && inputs.os == 'macos-13' }} + if : ${{ !inputs.free-threading && inputs.os == 'macos-15' }} run: >- python3 Tools/build/check_warnings.py --compiler-output-file-path=compiler_output_macos.txt diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index d4a84223b7b8a5..7b152b8c232382 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -58,7 +58,7 @@ jobs: # runner: windows-2022 - target: x86_64-apple-darwin/clang architecture: x86_64 - runner: macos-13 + runner: macos-15 - target: aarch64-apple-darwin/clang architecture: aarch64 runner: macos-14 @@ -103,7 +103,7 @@ jobs: # The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966. # This is a bug in the macOS runner image where the pre-installed Python is installed in the same - # directory as the Homebrew Python, which causes the build to fail for macos-13. This line removes + # directory as the Homebrew Python, which causes the build to fail for macos-15. This line removes # the symlink to the pre-installed Python so that the Homebrew Python is used instead. # Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail. # We either need to upgrade LLVM or change the directory being pointed to. From b181149b9f5babfbc3d313e610f85181896f1cac Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Thu, 2 Oct 2025 15:40:24 -0500 Subject: [PATCH 05/10] try removing find fix --- .github/workflows/jit.yml | 6 ------ .github/workflows/tail-call.yml | 7 ------- 2 files changed, 13 deletions(-) diff --git a/.github/workflows/jit.yml b/.github/workflows/jit.yml index 3cdf48a98f127c..c32bf4fd63cc8f 100644 --- a/.github/workflows/jit.yml +++ b/.github/workflows/jit.yml @@ -106,16 +106,10 @@ jobs: ./PCbuild/build.bat --experimental-jit ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} ./PCbuild/rt.bat ${{ matrix.debug && '-d' || '' }} -p ${{ matrix.architecture }} -q --multiprocess 0 --timeout 4500 --verbose2 --verbose3 - # The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966. - # This is a bug in the macOS runner image where the pre-installed Python is installed in the same - # directory as the Homebrew Python, which causes the build to fail for macos-15 - # (was 13, see if bug still exists?) This line removes the symlink to the pre-installed Python so - # that the Homebrew Python is used instead. - name: macOS if: runner.os == 'macOS' run: | brew update - find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" # Set MACOSX_DEPLOYMENT_TARGET and -Werror=unguarded-availability to diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 7b152b8c232382..0435c4b76c823d 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -101,17 +101,10 @@ jobs: set LLVMInstallDir=C:\Program Files\LLVM ./PCbuild/build.bat --tail-call-interp -p ${{ matrix.architecture }} - # The `find` line is required as a result of https://github.com/actions/runner-images/issues/9966. - # This is a bug in the macOS runner image where the pre-installed Python is installed in the same - # directory as the Homebrew Python, which causes the build to fail for macos-15. This line removes - # the symlink to the pre-installed Python so that the Homebrew Python is used instead. - # Note: when a new LLVM is released, the homebrew installation directory changes, so the builds will fail. - # We either need to upgrade LLVM or change the directory being pointed to. - name: Native macOS (release) if: runner.os == 'macOS' run: | brew update - find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete brew install llvm@${{ matrix.llvm }} export SDKROOT="$(xcrun --show-sdk-path)" export PATH="/usr/local/opt/llvm@${{ matrix.llvm }}/bin:$PATH" From b36ac0794e383257421fe9e32cdb0c26705275d8 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Thu, 2 Oct 2025 18:36:21 -0400 Subject: [PATCH 06/10] Update build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1b1ad360e5a9b6..1769874be43420 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -208,7 +208,7 @@ jobs: os: - ghcr.io/cirruslabs/macos-runner:sonoma - macos-14 - - macos-15 + - macos-15-intel is-fork: # only used for the exclusion trick - ${{ github.repository_owner != 'python' }} free-threading: From 46a4d503317309ca520ed3b00c489ecb7da1ced2 Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Thu, 2 Oct 2025 18:36:29 -0400 Subject: [PATCH 07/10] Update build.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1769874be43420..62c781693e95c7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -202,7 +202,7 @@ jobs: strategy: fail-fast: false matrix: - # Cirrus and macos-14 are M1, macos-15 is default GHA Intel. + # Cirrus and macos-14 are M1, macos-15-intel is default GHA Intel. # macOS 13 only runs tests against the GIL-enabled CPython. # Cirrus used for upstream, macos-14 for forks. os: From a240580e4c581615ebad8dbfc98d9c339841af5a Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Fri, 3 Oct 2025 10:57:52 -0500 Subject: [PATCH 08/10] Apply suggestion from @webknjaz MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 62c781693e95c7..ebfaf32e193bcb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -219,7 +219,7 @@ jobs: is-fork: true - os: macos-14 is-fork: false - - os: macos-15 + - os: macos-15-intel free-threading: true uses: ./.github/workflows/reusable-macos.yml with: From 9c075fadce816c1cfd3e01d7e76d6194b117627f Mon Sep 17 00:00:00 2001 From: Jacob Coffee Date: Fri, 3 Oct 2025 10:58:15 -0500 Subject: [PATCH 09/10] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/reusable-macos.yml | 6 +++--- .github/workflows/tail-call.yml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-macos.yml b/.github/workflows/reusable-macos.yml index 07d9431ea99b5b..87bcd5786e7a88 100644 --- a/.github/workflows/reusable-macos.yml +++ b/.github/workflows/reusable-macos.yml @@ -60,15 +60,15 @@ jobs: --prefix=/opt/python-dev \ --with-openssl="$(brew --prefix openssl@3.0)" - name: Build CPython - if : ${{ inputs.free-threading || inputs.os != 'macos-15' }} + if : ${{ inputs.free-threading || inputs.os != 'macos-15-intel' }} run: gmake -j8 - name: Build CPython for compiler warning check - if : ${{ !inputs.free-threading && inputs.os == 'macos-15' }} + if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }} run: set -o pipefail; gmake -j8 --output-sync 2>&1 | tee compiler_output_macos.txt - name: Display build info run: make pythoninfo - name: Check compiler warnings - if : ${{ !inputs.free-threading && inputs.os == 'macos-15' }} + if : ${{ !inputs.free-threading && inputs.os == 'macos-15-intel' }} run: >- python3 Tools/build/check_warnings.py --compiler-output-file-path=compiler_output_macos.txt diff --git a/.github/workflows/tail-call.yml b/.github/workflows/tail-call.yml index 0435c4b76c823d..e99e317182eaa6 100644 --- a/.github/workflows/tail-call.yml +++ b/.github/workflows/tail-call.yml @@ -58,7 +58,7 @@ jobs: # runner: windows-2022 - target: x86_64-apple-darwin/clang architecture: x86_64 - runner: macos-15 + runner: macos-15-intel - target: aarch64-apple-darwin/clang architecture: aarch64 runner: macos-14 From 2dce42810c5155fc3b37584f37a6b3c36d53dac5 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com> Date: Fri, 3 Oct 2025 22:10:19 +0300 Subject: [PATCH 10/10] Mention other pending issue --- .github/actionlint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actionlint.yaml b/.github/actionlint.yaml index a139f3dd197ed8..267ff6b42a8655 100644 --- a/.github/actionlint.yaml +++ b/.github/actionlint.yaml @@ -1,5 +1,6 @@ self-hosted-runner: # Pending https://github.com/rhysd/actionlint/issues/533 + # and https://github.com/rhysd/actionlint/issues/571 labels: ["windows-11-arm", "macos-15-intel"] config-variables: null