[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
Thu Jul 23 08:58:32 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/4] [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/4] 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/4] 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/4] 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



More information about the llvm-commits mailing list