[llvm] Attempt to use composite action for libc++ builders. (PR #74489)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 5 08:15:04 PST 2023
https://github.com/EricWF updated https://github.com/llvm/llvm-project/pull/74489
>From c31f3b7291c954414c1a6f031c658cf9a604ab9f Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Tue, 5 Dec 2023 11:02:40 -0500
Subject: [PATCH 1/2] Attempt to use composite action for libc++ builders.
This will allow us to refactor the single composite action rather
than every usage of it in the workflow when we want to make changes.
For the moment, the patch references an out-of-org action, this is
only temporary to demonstrate that it works.
---
.../actions/libcxx/run-buildbot/action.yaml | 45 ++++++++++++
.github/workflows/libcxx-build-and-test.yaml | 68 +++++--------------
2 files changed, 63 insertions(+), 50 deletions(-)
create mode 100644 .github/actions/libcxx/run-buildbot/action.yaml
diff --git a/.github/actions/libcxx/run-buildbot/action.yaml b/.github/actions/libcxx/run-buildbot/action.yaml
new file mode 100644
index 0000000000000..b4259db2f57bd
--- /dev/null
+++ b/.github/actions/libcxx/run-buildbot/action.yaml
@@ -0,0 +1,45 @@
+name: 'Configure the runtimes build'
+description: 'Match strings against paths in diff for origin/main and current SHA'
+
+inputs:
+ configuration:
+ description: 'the configuration to build'
+ required: true
+ cxx:
+ description: 'C++ compiler'
+ required: true
+ cc:
+ description: 'C compiler'
+ required: true
+ enable_clang_tidy:
+ description: 'enable clang-tidy'
+ required: false
+ default: 'OFF'
+ std_modules:
+ description: 'enable std modules'
+ required: false
+ default: 'OFF'
+
+
+runs:
+ using: "composite"
+
+ steps:
+ - uses: actions/checkout at v4
+ - name: ${{ inputs.config }}.${{ inputs.cxx }}
+ run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ env:
+ CC: ${{ inputs.cc }}
+ CXX: ${{ inputs.cxx }}
+ ENABLE_CLANG_TIDY: ${{ inputs.clang_tidy }}
+ ENABLE_STD_MODULES: ${{ inputs.std_modules }}
+ - uses: actions/upload-artifact at v3
+ if: always()
+ with:
+ name: ${{ inputs.config }}-${{ matrix.cxx }}-results
+ path: |
+ **/test-results.xml
+ **/*.abilist
+ **/CMakeError.log
+ **/CMakeOutput.log
+ **/crash_diagnostics/*
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index 83786052a5391..8d7485e9852c2 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -69,23 +69,13 @@ jobs:
cxx: 'g++-13'
clang_tidy: 'OFF'
steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}.${{ matrix.cxx }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- - uses: actions/upload-artifact at v3
- if: always()
+ # FIXME: Change to ./.github/actions/libcxx/run-buildbot
+ - uses: libcxx/actions/run-buildbot at main
with:
- name: ${{ matrix.config }}-${{ matrix.cxx }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
+ config: ${{ matrix.config }}
+ cc: ${{ matrix.cc }}
+ cxx: ${{ matrix.cxx }}
+ clang_tidy: ${{ matrix.clang_tidy }}
stage2:
if: github.repository_owner == 'llvm'
runs-on: libcxx-runners-8-set
@@ -118,23 +108,13 @@ jobs:
cxx: 'clang++-17'
clang_tidy: 'OFF'
steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: ${{ matrix.cc }}
- CXX: ${{ matrix.cxx }}
- ENABLE_CLANG_TIDY: ${{ matrix.clang_tidy }}
- - uses: actions/upload-artifact at v3
- if: always() # Upload artifacts even if the build or test suite fails
+ - uses: ./.github/actions/libcxx/run-buildbot
with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
+ config: ${{ matrix.config }}
+ cc: ${{ matrix.cc }}
+ cxx: ${{ matrix.cxx }}
+ clang_tidy: ${{ matrix.clang_tidy }}
+
stage3:
if: github.repository_owner == 'llvm'
needs: [ stage1, stage2 ]
@@ -188,22 +168,10 @@ jobs:
std_modules: 'OFF'
runs-on: ${{ matrix.machine }}
steps:
- - uses: actions/checkout at v4
- - name: ${{ matrix.config }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
- env:
- CC: clang-18
- CXX: clang++-18
- ENABLE_CLANG_TIDY: "OFF"
- ENABLE_STD_MODULES: ${{ matrix.std_modules }}
- - uses: actions/upload-artifact at v3
- if: always()
+ - uses: libcxx/actions/run-buildbot at main
with:
- name: ${{ matrix.config }}-results
- path: |
- **/test-results.xml
- **/*.abilist
- **/CMakeError.log
- **/CMakeOutput.log
- **/crash_diagnostics/*
-
+ config: ${{ matrix.config }}
+ cc: clang-18
+ cxx: clang++-18
+ clang_tidy: "OFF"
+ std_modules: ${{ matrix.std_modules }}
>From 1ba53322ac592cbc2cb1d1be46ceb48535d19636 Mon Sep 17 00:00:00 2001
From: eric <eric at efcs.ca>
Date: Tue, 5 Dec 2023 11:14:53 -0500
Subject: [PATCH 2/2] fix configuration issues
---
.../actions/libcxx/run-buildbot/action.yaml | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/.github/actions/libcxx/run-buildbot/action.yaml b/.github/actions/libcxx/run-buildbot/action.yaml
index b4259db2f57bd..7dbe036981185 100644
--- a/.github/actions/libcxx/run-buildbot/action.yaml
+++ b/.github/actions/libcxx/run-buildbot/action.yaml
@@ -1,5 +1,5 @@
-name: 'Configure the runtimes build'
-description: 'Match strings against paths in diff for origin/main and current SHA'
+name: 'Run Buildbot for libc++'
+description: 'Invoke the run-buildbot script with the specified parameters'
inputs:
configuration:
@@ -15,7 +15,7 @@ inputs:
description: 'enable clang-tidy'
required: false
default: 'OFF'
- std_modules:
+ enable_std_modules:
description: 'enable std modules'
required: false
default: 'OFF'
@@ -23,20 +23,20 @@ inputs:
runs:
using: "composite"
-
steps:
- uses: actions/checkout at v4
- - name: ${{ inputs.config }}.${{ inputs.cxx }}
- run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
+ - name: ${{ inputs.configuration }}.${{ inputs.cxx }}
+ run: libcxx/utils/ci/run-buildbot ${{ inputs.configuration }}
+ shell: bash
env:
CC: ${{ inputs.cc }}
CXX: ${{ inputs.cxx }}
- ENABLE_CLANG_TIDY: ${{ inputs.clang_tidy }}
- ENABLE_STD_MODULES: ${{ inputs.std_modules }}
+ ENABLE_CLANG_TIDY: ${{ inputs.enable_clang_tidy }}
+ ENABLE_STD_MODULES: ${{ inputs.enable_std_modules }}
- uses: actions/upload-artifact at v3
if: always()
with:
- name: ${{ inputs.config }}-${{ matrix.cxx }}-results
+ name: ${{ inputs.configuration }}-${{ inputs.cxx }}-results
path: |
**/test-results.xml
**/*.abilist
More information about the llvm-commits
mailing list