| # Pre-commit CI for the compiler-rt + LLVM-libc builtins integration. | |
| name: compiler-rt + libc Builtins Tests | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - "compiler-rt/lib/builtins/**" | |
| - "compiler-rt/test/builtins/**" | |
| - "libc/shared/builtins.h" | |
| - "libc/shared/builtins/**" | |
| - "libc/src/__support/builtins/**" | |
| - "libc/src/__support/FPUtil/**" | |
| - ".github/workflows/compiler-rt-libc-builtins-tests.yml" | |
| jobs: | |
| build: | |
| name: builtins (${{ matrix.os }}) | |
| if: github.repository_owner == 'llvm' | |
| runs-on: ${{ matrix.os }} | |
| container: | |
| image: ${{ (startsWith(matrix.os, 'ubuntu-26.04-arm') && | |
| 'ghcr.io/llvm/arm64v8/libc-ubuntu-26.04:latest@sha256:850c44c5e6999c09375244732cc7eaf8a4f22c5d8c572255955d548d327013a6') || | |
| 'ghcr.io/llvm/libc-ubuntu-26.04:latest@sha256:589c2eae73af31daa0b82b074da719f7fe8ffa87ea0b58f128770a826a16619d' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-26.04, ubuntu-26.04-arm] | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Configure CMake | |
| run: | | |
| cmake \ | |
| -B build \ | |
| -S runtimes \ | |
| -DLLVM_ENABLE_RUNTIMES=compiler-rt \ | |
| -G Ninja \ | |
| -DCMAKE_C_COMPILER=clang-24 \ | |
| -DCMAKE_CXX_COMPILER=clang++-24 \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_ENABLE_ASSERTIONS=ON \ | |
| -DCOMPILER_RT_STANDALONE_BUILD=ON \ | |
| -DCOMPILER_RT_USE_LIBC_MATH=ON \ | |
| -DLLVM_EXTERNAL_LIT=$(which lit-24) \ | |
| -DCOMPILER_RT_INCLUDE_TESTS=ON | |
| - name: Test compiler-rt builtins | |
| run: | | |
| cmake \ | |
| --build build \ | |
| --parallel \ | |
| --target check-builtins |