-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Add libc++ github actions workflow to replace buildkite #71836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
90b686d
to
4f4be4b
Compare
4f4be4b
to
66831bf
Compare
@llvm/pr-subscribers-libcxx @llvm/pr-subscribers-github-workflow Author: Eric (EricWF) ChangesThis change ports almost all of the linux buildkite builders to github actions. I would like to have this transition occur as soon as possible. Full diff: https://github.com/llvm/llvm-project/pull/71836.diff 2 Files Affected:
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@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@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@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@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@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@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@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@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
|
66831bf
to
8f3e29d
Compare
25ae81c
to
f261994
Compare
This adds a github actions replacement for most of the buildkite pipeline. There are a lot of benefits to using actions over buildkite, so I'll spare the reader reciting them all. The primary reasons are: * More flexability * Easier for other contributors to maintain. * Easier to scale
f261994
to
dc5fc0e
Compare
This change ports almost all of the linux buildkite builders to github actions. I would like to have this transition occur as soon as possible.
This change ports almost all of the linux buildkite builders to github actions. I would like to have this transition occur as soon as possible.
clang_tidy: [ 'ON' ] | ||
include: | ||
- config: 'generic-gcc' | ||
cc: 'gcc-13' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it not possible to use the GCC_STABLE_VERSION
here and LLVM_HEAD_VERSION
in other places. I added these to buildkite to reduce the maintenance while updating compilers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We discussed it with Eric and he wants to improve that, but it wasn't easy to do because of what kind of expansion Github workflow files support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the info.
'generic-with_llvm_unwinder' | ||
] | ||
machine: [ 'libcxx-runners-8' ] | ||
std_modules: [ 'OFF' ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@EricWF It seems this turns off the testing of the modules in our CI. Why was this changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turns off testing standard modules for the above configurations, yes.
Modules are still enabled for the generic-cxx26
configuration below.
Turning on module for these configurations means that we no longer test these configurations without modules, correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed privately not entirely. Based on your suggestion to manually build modules instead of relying on CMake I've been working on a patch. The preparation patch for that removes this line. Since your suggested approach is a lot simpler and solves the concerns you voiced I think we can keep this as is for now and go for the simpler approach.
This change ports almost all of the linux buildkite builders to github actions.
I would like to have this transition occur as soon as possible.