[clang] [libc++] Move the check-generated-files job to Github Actions (PR #68920)

Louis Dionne via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 13 10:57:38 PDT 2023


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

>From d1c371b9783777d90647b5d93b16266fe053287f Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 12 Oct 2023 10:29:40 -0700
Subject: [PATCH 1/4] [libc++] Move the check-generated-files job to Github
 Actions

This allows running these quick checks faster than in our Buildkite
pipeline, which has much more latency. This will also avoid blocking
the rest of the testing pipeline in case the generated-files checks
are failing.
---
 .../libcxx-check-generated-files.yml          | 25 +++++++++++++++++++
 libcxx/utils/ci/buildkite-pipeline.yml        | 19 --------------
 2 files changed, 25 insertions(+), 19 deletions(-)
 create mode 100644 .github/workflows/libcxx-check-generated-files.yml

diff --git a/.github/workflows/libcxx-check-generated-files.yml b/.github/workflows/libcxx-check-generated-files.yml
new file mode 100644
index 000000000000000..1e81d06af266db2
--- /dev/null
+++ b/.github/workflows/libcxx-check-generated-files.yml
@@ -0,0 +1,25 @@
+name: "Check libc++ generated files"
+on:
+  pull_request:
+    paths:
+      - 'libcxx/**'
+
+jobs:
+  check_generated_files:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout at v4
+        with:
+          fetch-depth: 2
+
+      - name: Install clang-format
+        uses: aminya/setup-cpp at v1
+        with:
+          clangformat: 17.0.1
+
+      - name: Install Ninja
+        uses: llvm/actions/install-ninja
+
+      - name: Check generated files
+        run: libcxx/utils/ci/run-buildbot check-generated-output
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 7a125d16af59493..460c5a8c4301dc4 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -26,31 +26,12 @@ env:
     # LLVM POST-BRANCH bump version
     # LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17"
     # LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15"
-    LLVM_STABLE_VERSION: "17" # Used for tooling, update after the RELEASE.
     LLVM_HEAD_VERSION: "18"   # Used compiler, update POST-BRANCH.
     GCC_STABLE_VERSION: "13"
 steps:
   #
   # Light pre-commit tests for things like forgetting to update generated files.
   #
-  - label: "Generated output"
-    command: "libcxx/utils/ci/run-buildbot check-generated-output"
-    artifact_paths:
-      - "**/generated_output.patch"
-      - "**/generated_output.status"
-    env:
-        CC: "clang-${LLVM_HEAD_VERSION}"
-        CXX: "clang++-${LLVM_HEAD_VERSION}"
-        CLANG_FORMAT: "/usr/bin/clang-format-${LLVM_STABLE_VERSION}"
-    agents:
-      queue: "libcxx-builders"
-      os: "linux"
-    retry:
-      automatic:
-        - exit_status: -1  # Agent was lost
-          limit: 2
-    timeout_in_minutes: 120
-
   - label: "Documentation"
     command: "libcxx/utils/ci/run-buildbot documentation"
     artifact_paths:

>From 19a6b12473c8214622aaef2f765ebd6247c5d65c Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Thu, 12 Oct 2023 15:14:45 -0700
Subject: [PATCH 2/4] Use apt-get to install Ninja because using the LLVM
 action seems not to work

---
 .github/workflows/libcxx-check-generated-files.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/libcxx-check-generated-files.yml b/.github/workflows/libcxx-check-generated-files.yml
index 1e81d06af266db2..26b43b5774575d9 100644
--- a/.github/workflows/libcxx-check-generated-files.yml
+++ b/.github/workflows/libcxx-check-generated-files.yml
@@ -19,7 +19,7 @@ jobs:
           clangformat: 17.0.1
 
       - name: Install Ninja
-        uses: llvm/actions/install-ninja
+        run: sudo apt-get install -y ninja-build
 
       - name: Check generated files
         run: libcxx/utils/ci/run-buildbot check-generated-output

>From 1cc21583a9a299a546b16c762d06fb67428f5c6c Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 13 Oct 2023 07:47:33 -0700
Subject: [PATCH 3/4] Install Ninja using aminya/setup-cpp at v1

---
 .github/workflows/libcxx-check-generated-files.yml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/libcxx-check-generated-files.yml b/.github/workflows/libcxx-check-generated-files.yml
index 26b43b5774575d9..65b331e0bd51cd6 100644
--- a/.github/workflows/libcxx-check-generated-files.yml
+++ b/.github/workflows/libcxx-check-generated-files.yml
@@ -13,13 +13,11 @@ jobs:
         with:
           fetch-depth: 2
 
-      - name: Install clang-format
+      - name: Install dependencies
         uses: aminya/setup-cpp at v1
         with:
           clangformat: 17.0.1
-
-      - name: Install Ninja
-        run: sudo apt-get install -y ninja-build
+          ninja: true
 
       - name: Check generated files
         run: libcxx/utils/ci/run-buildbot check-generated-output

>From 0ff052b7827f41f77d3174b115fce020fa9c35cf Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Fri, 13 Oct 2023 10:57:22 -0700
Subject: [PATCH 4/4] Remove fetch-depth when checking out LLVM sources

---
 .github/workflows/libcxx-check-generated-files.yml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/.github/workflows/libcxx-check-generated-files.yml b/.github/workflows/libcxx-check-generated-files.yml
index 65b331e0bd51cd6..6f2d01ee0a56fdb 100644
--- a/.github/workflows/libcxx-check-generated-files.yml
+++ b/.github/workflows/libcxx-check-generated-files.yml
@@ -10,8 +10,6 @@ jobs:
     steps:
       - name: Fetch LLVM sources
         uses: actions/checkout at v4
-        with:
-          fetch-depth: 2
 
       - name: Install dependencies
         uses: aminya/setup-cpp at v1



More information about the cfe-commits mailing list