Skip to content

[libc++][CI] Test with variables for compiler versions. #8864

[libc++][CI] Test with variables for compiler versions.

[libc++][CI] Test with variables for compiler versions. #8864

# 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'
schedule:
# Run nightly at 08:00 UTC (aka 00:00 Pacific, aka 03:00 Eastern)
- cron: '0 8 * * *'
permissions:
contents: read # Default everything to read-only
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
env:
LLVM_VERSION_HEAD: 19
LLVM_VERSION_RELEASE: 18
LLVM_VERSION_RELEASE_1: 17
LLVM_VERSION_RELEASE_2: 16
GCC_VERSION_RELEASE: 14
jobs:
stage1:
if: github.repository_owner == 'llvm'
runs-on: libcxx-self-hosted-linux
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
continue-on-error: false
strategy:
fail-fast: false
matrix:
config: [
'generic-cxx26'
]

Check failure on line 54 in .github/workflows/libcxx-build-and-test.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/libcxx-build-and-test.yaml

Invalid workflow file

You have an error in your yaml syntax on line 54
cc: [ ${{ format('clang-{0}', env.LLVM_VERSION_HEAD) }} ]
cxx: [ ${{ format('clang++-{0}', env.LLVM_VERSION_HEAD) }} ]
include:
- config: 'generic-gcc'
cc: ${{ format('gcc-{0}', env.GCC_VERSION_RELEASE) }}
cxx: ${{ format('g++-{0}', env.GCC_VERSION_RELEASE) }}
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 }}
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
if: always()
with:
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
path: |
**/test-results.xml
**/*.abilist
**/CMakeConfigureLog.yaml
**/CMakeError.log
**/CMakeOutput.log
**/crash_diagnostics/*