[libcxx] [llvm] Add libc++ github actions workflow to replace buildkite (PR #71836)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 09:42:14 PST 2023


https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/71836

>From 66831bf805cedac3e073ab7f8bc8ae312f3411fb Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Tue, 14 Nov 2023 09:51:59 -0500
Subject: [PATCH] Add workflows for libc++ to replace buildkite builders

---
 .github/workflows/libcxx-build-and-test.yaml | 137 +++++++++++++++++++
 libcxx/utils/ci/run-buildbot                 |   4 +-
 2 files changed, 139 insertions(+), 2 deletions(-)
 create mode 100644 .github/workflows/libcxx-build-and-test.yaml

diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
new file mode 100644
index 000000000000000..8083a346782946e
--- /dev/null
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -0,0 +1,137 @@
+name: Build and Test libc++
+
+on: pull_request
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+  cancel-in-progress: true
+
+permissions:
+  checks: write
+
+env:
+  CMAKE: "/opt/bin/cmake"
+
+# Comment
+jobs:
+  stage1:
+    runs-on: libcxx-runners-16
+    continue-on-error: false
+    strategy:
+      fail-fast: true
+      matrix:
+        config: [ 'generic-cxx26', 'generic-cxx03', 'generic-modules' ]
+        cc: [ 'clang-18' ]
+        cxx: [ 'clang++-18' ]
+        include:
+          - config: 'generic-gcc'
+            cc: 'gcc-13'
+            cxx: 'g++-13'
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          fetch-depth: 5
+      - name: ${{ matrix.config }}.${{ matrix.cxx }}
+        run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+        env:
+          CC: ${{ matrix.cc }}
+          CXX: ${{ matrix.cxx }}
+      - uses: actions/upload-artifact at v3
+        if: always()
+        with:
+          name: ${{ matrix.config }}-${{ matrix.cxx }}-results
+          path: |
+            "**/test-results.xml"
+            "**/*.abilist"
+  stage2:
+    runs-on: libcxx-runners-16
+    needs: [ stage1  ]
+    continue-on-error: false
+    strategy:
+      fail-fast: true
+      max-parallel: 4
+      matrix:
+        config: [ 'generic-cxx11', 'generic-cxx14', 'generic-cxx17',
+                  'generic-cxx20', 'generic-cxx23' ]
+        include:
+          - config: 'generic-gcc-cxx11'
+            cc: 'gcc-13'
+            cxx: 'g++-13'
+          - config: 'generic-cxx23'
+            cc: 'clang-16'
+            cxx: 'clang++-16'
+          - config: 'generic-cxx23'
+            cc: 'clang-17'
+            cxx: 'clang++-17'
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          fetch-depth: 5
+      - name: ${{ matrix.config }}
+        run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+        env:
+          CC: 'clang-18'
+          CXX: 'clang++-18'
+      - uses: actions/upload-artifact at v3
+        if: always()
+        with:
+          name: ${{ matrix.config }}-results
+          path: |
+            "**/test-results.xml"
+            "**/*.abilist"
+  stage3-sanitizers:
+    runs-on: libcxx-runners-16
+    needs: [ stage1, stage2 ]
+    continue-on-error: false
+    strategy:
+      fail-fast: true
+      matrix:
+        config: [ 'generic-asan', 'generic-msan', 'generic-tsan', 'generic-ubsan' ]
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          fetch-depth: 5
+      - name: ${{ matrix.config }}
+        run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+        env:
+          CC: clang-18
+          CXX: clang++-18
+      - uses: actions/upload-artifact at v3
+        if: always()
+        with:
+          name: ${{ matrix.config }}-results
+          path: |
+            "**/test-results.xml"
+            "**/*.abilist"
+  stage3-remainder:
+    runs-on: libcxx-runners-8
+    needs: [ stage1, stage2 ]
+    continue-on-error: false
+    strategy:
+      fail-fast: true
+      max-parallel: 8
+      matrix:
+        config: [ 'generic-no-threads', 'generic-no-filesystem', 'generic-no-random_device',
+                 'generic-no-localization', 'generic-no-unicode', 'generic-no-wide-characters',
+                 'generic-no-experimental', 'generic-no-exceptions',
+                 'generic-abi-unstable',  'generic-hardening-mode-fast',
+                 'generic-hardening-mode-fast-with-abi-breaks', 'generic-hardening-mode-extensive',
+                'generic-hardening-mode-debug',
+                'generic-with_llvm_unwinder',
+                'generic-modules-lsv', 'generic-no-tzdb']
+    steps:
+      - uses: actions/checkout at v4
+        with:
+          fetch-depth: 5
+      - name: ${{ matrix.config }}
+        run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+        env:
+          CC: clang-18
+          CXX: clang++-18
+      - uses: actions/upload-artifact at v3
+        if: always()
+        with:
+          name: ${{ matrix.config }}-results
+          path: |
+            "**/test-results.xml"
+            "**/*.abilist"
+  
diff --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index fe99388a799be8a..d1b1e0f2e05fe47 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -137,7 +137,7 @@ function generate-cmake-base() {
           -DLIBUNWIND_ENABLE_WERROR=YES \
           -DLIBCXX_ENABLE_CLANG_TIDY=${ENABLE_CLANG_TIDY} \
           ${ENABLE_STD_MODULES} \
-          -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
+          -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests" \
           "${@}"
 }
 
@@ -372,7 +372,7 @@ bootstrapping-build)
           -DLLVM_TARGETS_TO_BUILD="host" \
           -DRUNTIMES_BUILD_ALLOW_DARWIN=ON \
           -DLLVM_ENABLE_ASSERTIONS=ON \
-          -DLLVM_LIT_ARGS="-sv --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
+          -DLLVM_LIT_ARGS="-v --xunit-xml-output test-results.xml --timeout=1500 --time-tests"
 
     echo "+++ Running the libc++ and libc++abi tests"
     ${NINJA} -vC "${BUILD_DIR}" check-runtimes



More information about the llvm-commits mailing list