Skip to content

Conversation

@tstellar
Copy link
Collaborator

When a PR is submitted the macos-14 workflow will run with LTO/PGO disabled. This makes it possible to run the workflow on the free runners with the six hour timeout and will allow us to test the workflow on pull requests.

When a PR is submitted the macos-14 workflow will run with LTO/PGO
disabled.  This makes it possible to run the workflow on the free
runners with the six hour timeout and will allow us to test the
workflow on pull requests.
@llvmbot
Copy link
Member

llvmbot commented Oct 30, 2025

@llvm/pr-subscribers-github-workflow

Author: Tom Stellard (tstellar)

Changes

When a PR is submitted the macos-14 workflow will run with LTO/PGO disabled. This makes it possible to run the workflow on the free runners with the six hour timeout and will allow us to test the workflow on pull requests.


Full diff: https://github.com/llvm/llvm-project/pull/165801.diff

1 Files Affected:

  • (modified) .github/workflows/release-binaries.yml (+18-3)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index fa73b9d9fe8d0..1846f4075c4e9 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -138,7 +138,6 @@ jobs:
           target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF"
         fi
 
-        echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
         case "${{ inputs.runs-on }}" in
           ubuntu-22.04*)
             build_runs_on="depot-${{ inputs.runs-on }}-16"
@@ -157,6 +156,23 @@ jobs:
             build_runs_on=$test_runs_on
             ;;
         esac
+
+        case "$build_runs_on" in
+          # These runners cannot build the full release package faster than
+          # the 6 hours timeout limit, so we need to use a configuration
+          # that builds more quickly.
+          macos-14)
+            bootstrap_prefix="BOOTSTRAP"
+            target_cmake_flags="$target_cmake_flags -DLLVM_RELEASE_ENABLE_LTO=OFF -DLLVM_RELEASE_ENABLE_PGO=OFF"
+            ;;
+          *)
+            bootstrap_prefix="BOOTSTRAP_BOOTSTRAP"
+            ;;
+        esac
+
+        target_cmake_flags="$target_cmake_flags -D${bootstrap_prefix}_CPACK_PACKAGE_FILE_NAME=$release_binary_basename"
+
+        echo "target-cmake-flags=$target_cmake_flags" >> $GITHUB_OUTPUT
         echo "build-runs-on=$build_runs_on" >> $GITHUB_OUTPUT
         echo "test-runs-on=$test_runs_on" >> $GITHUB_OUTPUT
 
@@ -200,8 +216,7 @@ jobs:
         # so we need to set some extra cmake flags to disable this.
         cmake -G Ninja -S llvm -B ${{ steps.setup-stage.outputs.build-prefix }}/build \
             ${{ needs.prepare.outputs.target-cmake-flags }} \
-            -C clang/cmake/caches/Release.cmake \
-            -DBOOTSTRAP_BOOTSTRAP_CPACK_PACKAGE_FILE_NAME="${{ needs.prepare.outputs.release-binary-basename }}"
+            -C clang/cmake/caches/Release.cmake
 
     - name: Build
       shell: bash

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we lose some fidelity, but that would be related to the caches and with the new case statement, but definitely an improvement over what we had previously.

@tstellar
Copy link
Collaborator Author

I guess we lose some fidelity, but that would be related to the caches and with the new case statement, but definitely an improvement over what we had previously.

Yeah, I tried not to remove projects or drop targets since that would impact which tests are running and might causes us to miss regressions. I know that there could still be an LTO/PGO only regression, but I think those are more rare.

My goal is to be able to start running the tests as post-commit on main and possibly pre-commit tests on the release branches so we can ensure that we can build for all supported targets. It's been difficult to maintain this over the long-term so far because it isn't getting tested that much.

@tstellar tstellar merged commit 0a28c07 into llvm:main Nov 3, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants