-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,196 @@ | ||
# This file defines pre-commit CI for libc++, libc++abi, and libunwind (on Github). | ||
# | ||
# We split the configurations in multiple stages with the intent of saving compute time | ||
# when a job fails early in the pipeline. This is why the jobs are marked as `continue-on-error: false`. | ||
# We try to run the CI configurations with the most signal in the first stage. | ||
# | ||
# Stages 1 & 2 are meant to be "smoke tests", and are meant to catch most build/test failures quickly and without using | ||
# too many resources. | ||
# Stage 3 is "everything else", and is meant to catch breakages on more niche or unique configurations. | ||
# | ||
# Therefore, we "fail-fast" for any failures during stages 1 & 2, meaning any job failing cancels all other running jobs, | ||
# under the assumption that if the "smoke tests" fail, then the other configurations will likely fail in the same way. | ||
# However, stage 3 does not fail fast, as it's more likely that any one job failing is a flake or a configuration-specific | ||
# | ||
name: Build and Test libc++ | ||
on: | ||
pull_request: | ||
paths: | ||
- 'libcxx/**' | ||
- 'libcxxabi/**' | ||
- 'libunwind/**' | ||
- 'runtimes/**' | ||
- 'cmake/**' | ||
- '.github/workflows/libcxx-build-and-test.yaml' | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | ||
cancel-in-progress: true | ||
|
||
|
||
env: | ||
EricWF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
CMAKE: "/opt/bin/cmake" | ||
# LLVM POST-BRANCH bump version | ||
EricWF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# 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_HEAD_VERSION: "18" # Used compiler, update POST-BRANCH. | ||
LLVM_PREVIOUS_VERSION: "17" | ||
LLVM_OLDEST_VERSION: "16" | ||
GCC_STABLE_VERSION: "13" | ||
LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-18" | ||
CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics" | ||
|
||
|
||
jobs: | ||
stage1: | ||
runs-on: libcxx-runners-16 | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
config: [ | ||
'generic-cxx03', | ||
'generic-cxx26', | ||
'generic-modules' | ||
] | ||
cc: [ 'clang-18' ] | ||
cxx: [ 'clang++-18' ] | ||
clang_tidy: [ 'ON' ] | ||
include: | ||
- config: 'generic-gcc' | ||
cc: 'gcc-13' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it not possible to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the info. |
||
cxx: 'g++-13' | ||
clang_tidy: 'OFF' | ||
steps: | ||
- uses: actions/checkout@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@v3 | ||
if: always() | ||
EricWF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
name: ${{ matrix.config }}-${{ matrix.cxx }}-results | ||
path: | | ||
**/test-results.xml | ||
**/*.abilist | ||
**/CMakeError.log | ||
**/CMakeOutput.log | ||
**/crash_diagnostics/* | ||
stage2: | ||
runs-on: libcxx-runners-8 | ||
needs: [ stage1 ] | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: true | ||
EricWF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
matrix: | ||
config: [ | ||
'generic-cxx11', | ||
'generic-cxx14', | ||
'generic-cxx17', | ||
'generic-cxx20', | ||
'generic-cxx23' | ||
] | ||
cc: [ 'clang-18' ] | ||
cxx: [ 'clang++-18' ] | ||
clang_tidy: [ 'ON' ] | ||
include: | ||
- config: 'generic-gcc-cxx11' | ||
cc: 'gcc-13' | ||
cxx: 'g++-13' | ||
clang_tidy: 'OFF' | ||
- config: 'generic-cxx23' | ||
cc: 'clang-16' | ||
cxx: 'clang++-16' | ||
clang_tidy: 'OFF' | ||
- config: 'generic-cxx23' | ||
cc: 'clang-17' | ||
cxx: 'clang++-17' | ||
clang_tidy: 'OFF' | ||
steps: | ||
- uses: actions/checkout@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@v3 | ||
if: always() # Upload artifacts even if the build or test suite fails | ||
with: | ||
name: ${{ matrix.config }}-results | ||
path: | | ||
**/test-results.xml | ||
**/*.abilist | ||
**/CMakeError.log | ||
**/CMakeOutput.log | ||
**/crash_diagnostics/* | ||
stage3: | ||
needs: [ stage1, stage2 ] | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 8 | ||
matrix: | ||
config: [ | ||
'generic-abi-unstable', | ||
'generic-hardening-mode-debug', | ||
'generic-hardening-mode-extensive', | ||
'generic-hardening-mode-fast', | ||
'generic-hardening-mode-fast-with-abi-breaks', | ||
'generic-merged', | ||
'generic-modules-lsv', | ||
'generic-no-exceptions', | ||
'generic-no-experimental', | ||
'generic-no-filesystem', | ||
'generic-no-localization', | ||
'generic-no-random_device', | ||
'generic-no-threads', | ||
'generic-no-tzdb', | ||
'generic-no-unicode', | ||
'generic-no-wide-characters', | ||
'generic-static', | ||
'generic-with_llvm_unwinder' | ||
] | ||
machine: [ 'libcxx-runners-8' ] | ||
std_modules: [ 'OFF' ] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 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 commentThe 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. |
||
include: | ||
- config: 'generic-cxx26' | ||
machine: libcxx-runners-8 | ||
std_modules: 'ON' | ||
- config: 'generic-asan' | ||
machine: libcxx-runners-16 | ||
std_modules: 'OFF' | ||
- config: 'generic-tsan' | ||
machine: libcxx-runners-16 | ||
std_modules: 'OFF' | ||
- config: 'generic-ubsan' | ||
machine: libcxx-runners-8 | ||
std_modules: 'OFF' | ||
# Use a larger machine for MSAN to avoid timeout and memory allocation issues. | ||
- config: 'generic-msan' | ||
machine: libcxx-runners-30 | ||
std_modules: 'OFF' | ||
runs-on: ${{ matrix.machine }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: ${{ matrix.config }} | ||
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} | ||
env: | ||
CC: clang-18 | ||
CXX: clang++-18 | ||
EricWF marked this conversation as resolved.
Show resolved
Hide resolved
|
||
ENABLE_CLANG_TIDY: "OFF" | ||
ENABLE_STD_MODULES: ${{ matrix.std_modules }} | ||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: ${{ matrix.config }}-results | ||
path: | | ||
**/test-results.xml | ||
**/*.abilist | ||
**/CMakeError.log | ||
**/CMakeOutput.log | ||
**/crash_diagnostics/* | ||
|
Uh oh!
There was an error while loading. Please reload this page.