mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 18:46:40 +00:00

This also fixes test failures in the clang-cl build configs that started a couple days ago. It seems like the failures were triggered by an update to the base image on the Github provided runners. There were failures in test/libcxx/system_reserved_names.gen.py, due to an issue in an Clang intrinsics header (avx512fp16intrin.h); this issue was observed and fixed for Clang 19 in 6f04f46927c. The test does #define A SYSTEM_RESERVED_NAME which clashes with a parameter with the name `A` in that header. By upgrading the toolchain to Clang 19, we get fixed version of this intrinsics header. Also update the llvm-mingw toolchains to a version with Clang 19.1.7. (cherry picked from commit e6a0ee3d1d12c9c02c1a361109e282d18dd2430c)
278 lines
9.5 KiB
YAML
278 lines
9.5 KiB
YAML
# 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
|
|
|
|
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: [
|
|
'frozen-cxx03-headers',
|
|
'generic-cxx03',
|
|
'generic-cxx26',
|
|
'generic-modules'
|
|
]
|
|
cc: [ 'clang-20' ]
|
|
cxx: [ 'clang++-20' ]
|
|
include:
|
|
- config: 'generic-gcc'
|
|
cc: 'gcc-14'
|
|
cxx: 'g++-14'
|
|
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/*
|
|
stage2:
|
|
if: github.repository_owner == 'llvm'
|
|
runs-on: libcxx-self-hosted-linux
|
|
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
|
|
needs: [ stage1 ]
|
|
continue-on-error: false
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
config: [
|
|
'generic-cxx11',
|
|
'generic-cxx14',
|
|
'generic-cxx17',
|
|
'generic-cxx20',
|
|
'generic-cxx23'
|
|
]
|
|
cc: [ 'clang-20' ]
|
|
cxx: [ 'clang++-20' ]
|
|
include:
|
|
- config: 'generic-gcc-cxx11'
|
|
cc: 'gcc-14'
|
|
cxx: 'g++-14'
|
|
- config: 'generic-cxx23'
|
|
cc: 'clang-18'
|
|
cxx: 'clang++-18'
|
|
- config: 'generic-cxx26'
|
|
cc: 'clang-19'
|
|
cxx: 'clang++-19'
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: ${{ matrix.config }}
|
|
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() # Upload artifacts even if the build or test suite fails
|
|
with:
|
|
name: ${{ matrix.config }}-${{ matrix.cxx }}-results
|
|
path: |
|
|
**/test-results.xml
|
|
**/*.abilist
|
|
**/CMakeConfigureLog.yaml
|
|
**/CMakeError.log
|
|
**/CMakeOutput.log
|
|
**/crash_diagnostics/*
|
|
stage3:
|
|
if: github.repository_owner == 'llvm'
|
|
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-terminal',
|
|
'generic-no-random_device',
|
|
'generic-no-threads',
|
|
'generic-no-tzdb',
|
|
'generic-no-unicode',
|
|
'generic-no-wide-characters',
|
|
'generic-no-rtti',
|
|
'generic-optimized-speed',
|
|
'generic-static',
|
|
'bootstrapping-build'
|
|
]
|
|
machine: [ 'libcxx-self-hosted-linux' ]
|
|
include:
|
|
- config: 'generic-cxx26'
|
|
machine: libcxx-self-hosted-linux
|
|
- config: 'generic-asan'
|
|
machine: libcxx-self-hosted-linux
|
|
- config: 'generic-tsan'
|
|
machine: libcxx-self-hosted-linux
|
|
- config: 'generic-ubsan'
|
|
machine: libcxx-self-hosted-linux
|
|
# Use a larger machine for MSAN to avoid timeout and memory allocation issues.
|
|
- config: 'generic-msan'
|
|
machine: libcxx-self-hosted-linux
|
|
runs-on: ${{ matrix.machine }}
|
|
container: ghcr.io/llvm/libcxx-linux-builder:d8a0709b1090350a7fe3604d8ab78c7d62f10698
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: ${{ matrix.config }}
|
|
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
|
|
env:
|
|
CC: clang-20
|
|
CXX: clang++-20
|
|
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
|
if: always()
|
|
with:
|
|
name: ${{ matrix.config }}-results
|
|
path: |
|
|
**/test-results.xml
|
|
**/*.abilist
|
|
**/CMakeConfigureLog.yaml
|
|
**/CMakeError.log
|
|
**/CMakeOutput.log
|
|
**/crash_diagnostics/*
|
|
|
|
macos:
|
|
needs: [ stage1 ]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- config: generic-cxx03
|
|
os: macos-15
|
|
- config: generic-cxx23
|
|
os: macos-15
|
|
- config: generic-modules
|
|
os: macos-15
|
|
- config: apple-configuration
|
|
os: macos-15
|
|
- config: apple-system
|
|
os: macos-13
|
|
- config: apple-system-hardened
|
|
os: macos-13
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: maxim-lobanov/setup-xcode@v1
|
|
with:
|
|
xcode-version: 'latest'
|
|
- uses: seanmiddleditch/gha-setup-ninja@master
|
|
- name: Build and test
|
|
run: |
|
|
python3 -m venv .venv
|
|
source .venv/bin/activate
|
|
python -m pip install psutil
|
|
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
|
|
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
|
|
if: always() # Upload artifacts even if the build or test suite fails
|
|
with:
|
|
name: macos-${{ matrix.config }}-results
|
|
path: |
|
|
**/test-results.xml
|
|
**/*.abilist
|
|
**/CMakeConfigureLog.yaml
|
|
**/CMakeError.log
|
|
**/CMakeOutput.log
|
|
**/crash_diagnostics/*
|
|
|
|
windows:
|
|
runs-on: windows-2022
|
|
needs: [ stage1 ]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { config: clang-cl-dll, mingw: false }
|
|
- { config: clang-cl-static, mingw: false }
|
|
- { config: clang-cl-no-vcruntime, mingw: false }
|
|
- { config: clang-cl-debug, mingw: false }
|
|
- { config: clang-cl-static-crt, mingw: false }
|
|
- { config: mingw-dll, mingw: true }
|
|
- { config: mingw-static, mingw: true }
|
|
- { config: mingw-dll-i686, mingw: true }
|
|
- { config: mingw-incomplete-sysroot, mingw: true }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install dependencies
|
|
run: |
|
|
choco install -y ninja
|
|
pip install psutil
|
|
- name: Install a current LLVM
|
|
if: ${{ matrix.mingw != true }}
|
|
run: |
|
|
choco install -y llvm --version=19.1.7 --allow-downgrade
|
|
- name: Install llvm-mingw
|
|
if: ${{ matrix.mingw == true }}
|
|
run: |
|
|
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250114/llvm-mingw-20250114-ucrt-x86_64.zip
|
|
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
|
|
del llvm-mingw*.zip
|
|
mv llvm-mingw* c:\llvm-mingw
|
|
echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Simulate a from-scratch build of llvm-mingw
|
|
if: ${{ matrix.config == 'mingw-incomplete-sysroot' }}
|
|
run: |
|
|
rm -r c:\llvm-mingw\include\c++
|
|
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++*
|
|
rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind*
|
|
- name: Add Git Bash to the path
|
|
run: |
|
|
echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Set up the MSVC dev environment
|
|
if: ${{ matrix.mingw != true }}
|
|
uses: ilammy/msvc-dev-cmd@v1
|
|
- name: Build and test
|
|
run: |
|
|
bash libcxx/utils/ci/run-buildbot ${{ matrix.config }}
|