[llvm] [premerge] Route macOS build through a monolithic script to enable Job Summary (PR #211565)
Arseniy Obolenskiy via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 24 00:37:48 PDT 2026
https://github.com/aobolensk updated https://github.com/llvm/llvm-project/pull/211565
>From 25c5488df72122bb808d59c2c34641379cc4b446 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 16:22:27 +0200
Subject: [PATCH 1/9] [premerge] Route macOS build through a monolithic script
to enable Job Summary
The macOS premerge job built inline instead of via a monolithic-*.sh script, so it never emitted a GitHub Job Summary or JUnit XML like Linux/Windows do on failure
---
.ci/monolithic-macos.sh | 40 +++++++++++++++++++++++++++++++++
.github/workflows/premerge.yaml | 23 +++----------------
2 files changed, 43 insertions(+), 20 deletions(-)
create mode 100755 .ci/monolithic-macos.sh
diff --git a/.ci/monolithic-macos.sh b/.ci/monolithic-macos.sh
new file mode 100755
index 0000000000000..37f20610440f6
--- /dev/null
+++ b/.ci/monolithic-macos.sh
@@ -0,0 +1,40 @@
+#!/usr/bin/env bash
+#===----------------------------------------------------------------------===##
+#
+# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+# See https://llvm.org/LICENSE.txt for license information.
+# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+#
+#===----------------------------------------------------------------------===##
+
+#
+# This script performs a monolithic build of the monorepo and runs the tests of
+# most projects on macOS. This should be replaced by per-project scripts that
+# run only the relevant tests.
+#
+
+source .ci/utils.sh
+
+projects="${1}"
+targets="${2}"
+
+start-group "CMake"
+
+xcrun cmake -G Ninja \
+ -B "${BUILD_DIR}" \
+ -S "${MONOREPO_ROOT}"/llvm \
+ -D LLVM_ENABLE_PROJECTS="${projects}" \
+ -D LLVM_DISABLE_ASSEMBLY_FILES=ON \
+ -D CMAKE_BUILD_TYPE=Release \
+ -D LLDB_INCLUDE_TESTS=OFF \
+ -D LLVM_ENABLE_ASSERTIONS=ON \
+ -D LLVM_LIT_ARGS="-v --xunit-xml-output ${BUILD_DIR}/test-results.xml --use-unique-output-file-name --timeout=1200 --time-tests --succinct" \
+ -D CMAKE_C_COMPILER_LAUNCHER=sccache \
+ -D CMAKE_CXX_COMPILER_LAUNCHER=sccache
+
+start-group "ninja"
+
+if [[ -n "${targets}" ]]; then
+ ninja -C "${BUILD_DIR}" ${targets} |& tee ninja.log
+ cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
+fi
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index e1ef62ed3904c..5cae95ce9300e 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -287,32 +287,15 @@ jobs:
env:
SCCACHE_BUCKET: sccache-bucket
SCCACHE_REGION: us-west-2
- PROJECTS: ${{ needs.premerge-compute-macos.outputs.macos-projects }}
- CHECK_TARGETS: ${{ needs.premerge-compute-macos.outputs.macos-check-targets }}
CLANG_TOOLCHAIN_PROGRAM_TIMEOUT: 120
+ GITHUB_TOKEN: ${{ github.token }}
+ GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
export SCCACHE_IDLE_TIMEOUT=0
mkdir -p artifacts
SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server
- xcrun cmake -G Ninja \
- -B build \
- -S llvm \
- -DLLVM_ENABLE_PROJECTS="${PROJECTS}" \
- -DLLVM_DISABLE_ASSEMBLY_FILES=ON \
- -DCMAKE_BUILD_TYPE=Release \
- -DLLDB_INCLUDE_TESTS=OFF \
- -DLLVM_ENABLE_ASSERTIONS=ON \
- -DCMAKE_C_COMPILER_LAUNCHER=sccache \
- -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-
- ninja -C build ${CHECK_TARGETS}
- - name: Show sccache stats
- if: always()
- run: |
- mkdir -p artifacts
- sccache --show-stats
- sccache --show-stats >> artifacts/sccache_stats.txt
+ ./.ci/monolithic-macos.sh "${{ needs.premerge-compute-macos.outputs.macos-projects }}" "${{ needs.premerge-compute-macos.outputs.macos-check-targets }}"
- name: Upload Artifacts
# In some cases, Github will fail to upload the artifact. We want to
# continue anyways as a failed artifact upload is an infra failure, not
>From 599f4047a021cf0aa06f4ae5adf63b01c2ebfbbc Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 16:27:43 +0200
Subject: [PATCH 2/9] return vars
---
.github/workflows/premerge.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 5cae95ce9300e..b48f719b75ec9 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -287,6 +287,8 @@ jobs:
env:
SCCACHE_BUCKET: sccache-bucket
SCCACHE_REGION: us-west-2
+ PROJECTS: ${{ needs.premerge-compute-macos.outputs.macos-projects }}
+ CHECK_TARGETS: ${{ needs.premerge-compute-macos.outputs.macos-check-targets }}
CLANG_TOOLCHAIN_PROGRAM_TIMEOUT: 120
GITHUB_TOKEN: ${{ github.token }}
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
>From 9f839391297f6a6f1c02365691ea9c49f11db696 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 16:55:24 +0200
Subject: [PATCH 3/9] python
---
.github/workflows/premerge.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index b48f719b75ec9..74c4b4c8c044d 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -278,9 +278,9 @@ jobs:
with:
persist-credentials: false
fetch-depth: 2
- - name: Install Ninja, CMake, and sccache
+ - name: Install Ninja, CMake, Python, and sccache
run: |
- brew install ninja cmake
+ brew install ninja cmake python
command -v sccache >/dev/null || brew install sccache
- name: Build and Test
timeout-minutes: 240
>From 1d9c71635a5201a392ff2e7556d9e0ebb2ee369c Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 17:58:19 +0200
Subject: [PATCH 4/9] Address comments
---
.ci/monolithic-macos.sh | 3 +--
.github/workflows/premerge.yaml | 10 +++++++---
2 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/.ci/monolithic-macos.sh b/.ci/monolithic-macos.sh
index 37f20610440f6..aa02e3e3cc744 100755
--- a/.ci/monolithic-macos.sh
+++ b/.ci/monolithic-macos.sh
@@ -9,8 +9,7 @@
#
# This script performs a monolithic build of the monorepo and runs the tests of
-# most projects on macOS. This should be replaced by per-project scripts that
-# run only the relevant tests.
+# most projects on macOS.
#
source .ci/utils.sh
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 74c4b4c8c044d..1376bc248e149 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -278,10 +278,14 @@ jobs:
with:
persist-credentials: false
fetch-depth: 2
- - name: Install Ninja, CMake, Python, and sccache
+ - name: Install Ninja, CMake, and sccache
run: |
- brew install ninja cmake python
+ brew install ninja cmake
command -v sccache >/dev/null || brew install sccache
+ - name: Set up Python venv
+ run: |
+ python3 -m venv "${RUNNER_TEMP}/venv"
+ echo "${RUNNER_TEMP}/venv/bin" >> "$GITHUB_PATH"
- name: Build and Test
timeout-minutes: 240
env:
@@ -297,7 +301,7 @@ jobs:
mkdir -p artifacts
SCCACHE_LOG=info SCCACHE_ERROR_LOG=$(pwd)/artifacts/sccache.log sccache --start-server
- ./.ci/monolithic-macos.sh "${{ needs.premerge-compute-macos.outputs.macos-projects }}" "${{ needs.premerge-compute-macos.outputs.macos-check-targets }}"
+ ./.ci/monolithic-macos.sh "${PROJECTS}" "${CHECK_TARGETS}"
- name: Upload Artifacts
# In some cases, Github will fail to upload the artifact. We want to
# continue anyways as a failed artifact upload is an infra failure, not
>From 15526dae1251e4c2eccd7dd0d3a0697b480152ec Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 19:42:50 +0200
Subject: [PATCH 5/9] python 3.14
---
.github/workflows/premerge.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 1376bc248e149..17caa5c21e6e4 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -281,6 +281,7 @@ jobs:
- name: Install Ninja, CMake, and sccache
run: |
brew install ninja cmake
+ brew postinstall python at 3.14
command -v sccache >/dev/null || brew install sccache
- name: Set up Python venv
run: |
>From d5c410d4cca8ef4e8721fb3fd1235912fdb01850 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Thu, 23 Jul 2026 20:06:33 +0200
Subject: [PATCH 6/9] update pip
---
.github/workflows/premerge.yaml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 17caa5c21e6e4..cba29076e1fd4 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -280,13 +280,13 @@ jobs:
fetch-depth: 2
- name: Install Ninja, CMake, and sccache
run: |
- brew install ninja cmake
- brew postinstall python at 3.14
+ brew install ninja cmake python at 3.14
command -v sccache >/dev/null || brew install sccache
- name: Set up Python venv
run: |
- python3 -m venv "${RUNNER_TEMP}/venv"
+ "$(brew --prefix python at 3.14)/bin/python3.14" -m venv "${RUNNER_TEMP}/venv"
echo "${RUNNER_TEMP}/venv/bin" >> "$GITHUB_PATH"
+ "${RUNNER_TEMP}/venv/bin/python3" -m pip install -q --upgrade pip
- name: Build and Test
timeout-minutes: 240
env:
>From 66ff677aed38a2b784ea929206817571f8ab61fb Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Fri, 24 Jul 2026 06:45:43 +0200
Subject: [PATCH 7/9] test
---
.github/workflows/premerge.yaml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index cba29076e1fd4..983cf78c605e7 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -280,7 +280,13 @@ jobs:
fetch-depth: 2
- name: Install Ninja, CMake, and sccache
run: |
- brew install ninja cmake python at 3.14
+ brew install ninja cmake
+ # The python at 3.14 postinstall step regenerates unversioned python/pip
+ # symlinks and can fail on the runner, but the interpreter itself
+ # installs fine and we invoke it by absolute path below. Tolerate that
+ # failure, then assert the interpreter is actually present.
+ brew install python at 3.14 || true
+ test -x "$(brew --prefix python at 3.14)/bin/python3.14"
command -v sccache >/dev/null || brew install sccache
- name: Set up Python venv
run: |
>From 32e272f667168f779d55cd77691e3d7a992e5db5 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Fri, 24 Jul 2026 08:13:16 +0200
Subject: [PATCH 8/9] remove python install
---
.github/workflows/premerge.yaml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/.github/workflows/premerge.yaml b/.github/workflows/premerge.yaml
index 983cf78c605e7..ff19621d25dfc 100644
--- a/.github/workflows/premerge.yaml
+++ b/.github/workflows/premerge.yaml
@@ -281,12 +281,6 @@ jobs:
- name: Install Ninja, CMake, and sccache
run: |
brew install ninja cmake
- # The python at 3.14 postinstall step regenerates unversioned python/pip
- # symlinks and can fail on the runner, but the interpreter itself
- # installs fine and we invoke it by absolute path below. Tolerate that
- # failure, then assert the interpreter is actually present.
- brew install python at 3.14 || true
- test -x "$(brew --prefix python at 3.14)/bin/python3.14"
command -v sccache >/dev/null || brew install sccache
- name: Set up Python venv
run: |
>From a68191209e676326067a796a5d85ee18051549f7 Mon Sep 17 00:00:00 2001
From: Arseniy Obolenskiy <arseniy.obolenskiy at amd.com>
Date: Fri, 24 Jul 2026 09:37:33 +0200
Subject: [PATCH 9/9] fix tee
---
.ci/monolithic-macos.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.ci/monolithic-macos.sh b/.ci/monolithic-macos.sh
index aa02e3e3cc744..3da3a1b0ad323 100755
--- a/.ci/monolithic-macos.sh
+++ b/.ci/monolithic-macos.sh
@@ -34,6 +34,6 @@ xcrun cmake -G Ninja \
start-group "ninja"
if [[ -n "${targets}" ]]; then
- ninja -C "${BUILD_DIR}" ${targets} |& tee ninja.log
+ ninja -C "${BUILD_DIR}" ${targets} 2>&1 | tee ninja.log
cp ${BUILD_DIR}/.ninja_log ninja.ninja_log
fi
More information about the llvm-commits
mailing list