[libcxx-commits] [libcxx] [llvm] [libc++] Trigger the BuildKite pipeline from Github Actions (PR #165928)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Fri Oct 31 15:22:19 PDT 2025


https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/165928

>From b7cae928699ceaa6e3a69a5cde30e0ef9f21993a Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Oct 2025 14:54:59 -0700
Subject: [PATCH 1/2] [libc++] Trigger the BuildKite pipeline from Github
 Actions

Instead of always triggering the BuildKite pipeline and then
determining whether there is anything to do, trigger it from
the libc++ CI Github action. Since that Github action is only
triggered when relevant files have been modified, this simplifies
the triggering logic.

Importantly, it will also prevent all of the monorepo CI jobs from
waiting on the Buildkite pipeline to report that there's nothing
to do.
---
 .github/workflows/libcxx-build-and-test.yaml  | 13 +++++++
 libcxx/utils/ci/buildkite-pipeline-trigger.sh | 34 -------------------
 2 files changed, 13 insertions(+), 34 deletions(-)
 delete mode 100755 libcxx/utils/ci/buildkite-pipeline-trigger.sh

diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 6c8f2cb45ee0a..b4384d693b9fc 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -288,3 +288,16 @@ jobs:
       - name: Build and test
         run: |
           bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+
+  buildkite_platforms:
+    # needs: [ stage2 ] # TODO: temporarily always trigger
+    runs-on: llvm-premerge-libcxx-next-runners
+    steps:
+      - name: Trigger Buildkite pipeline
+        uses: buildkite/trigger-pipeline-action at v2.4.0
+        with:
+          buildkite_api_access_token: ${{ secrets.BUILDKITE_API_ACCESS_TOKEN }}
+          pipeline: llvm-project/libcxx-ci
+          branch: ${{ github.ref_name }}
+          commit: ${{ github.sha }}
+          message: "Triggered by GitHub Actions PR against ${{ github.ref_name }}"
diff --git a/libcxx/utils/ci/buildkite-pipeline-trigger.sh b/libcxx/utils/ci/buildkite-pipeline-trigger.sh
deleted file mode 100755
index 4661cd54fad42..0000000000000
--- a/libcxx/utils/ci/buildkite-pipeline-trigger.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-# ===----------------------------------------------------------------------===##
-#
-# 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 determines whether the libc++ Buildkite pipeline should be triggered
-# on a change. This is required because Buildkite gets notified for every PR in the
-# LLVM monorepo, and we make it a no-op unless the libc++ pipeline needs to be triggered.
-#
-
-# Set by buildkite
-: ${BUILDKITE_PULL_REQUEST_BASE_BRANCH:=}
-
-# Fetch origin to have an up to date merge base for the diff.
-git fetch origin
-# List of files affected by this commit
-: ${MODIFIED_FILES:=$(git diff --name-only origin/${BUILDKITE_PULL_REQUEST_BASE_BRANCH}...HEAD)}
-
-echo "Files modified:" >&2
-echo "$MODIFIED_FILES" >&2
-modified_dirs=$(echo "$MODIFIED_FILES" | cut -d'/' -f1 | sort -u)
-echo "Directories modified:" >&2
-echo "$modified_dirs" >&2
-
-# If libc++ or one of the runtimes directories changed, trigger the libc++ Buildkite pipeline.
-if echo "$modified_dirs" | grep -q -E "^(libcxx|libcxxabi|libunwind|runtimes|cmake)$"; then
-    buildkite-agent pipeline upload libcxx/utils/ci/buildkite-pipeline.yml
-else
-    echo "No Buildkite jobs to trigger"
-fi

>From 0388383af5553a817ade7616c0df7347e53e340b Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 31 Oct 2025 15:22:08 -0700
Subject: [PATCH 2/2] Try ubuntu latest

---
 .github/workflows/libcxx-build-and-test.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index b4384d693b9fc..8c4d4c51e361b 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -291,7 +291,7 @@ jobs:
 
   buildkite_platforms:
     # needs: [ stage2 ] # TODO: temporarily always trigger
-    runs-on: llvm-premerge-libcxx-next-runners
+    runs-on: ubuntu:latest
     steps:
       - name: Trigger Buildkite pipeline
         uses: buildkite/trigger-pipeline-action at v2.4.0



More information about the libcxx-commits mailing list