[llvm] [libc] Use containers for overlay precommit CIs. (PR #199294)
via llvm-commits
llvm-commits at lists.llvm.org
Sun May 24 09:31:51 PDT 2026
https://github.com/lntue updated https://github.com/llvm/llvm-project/pull/199294
>From 2f5d76b566f03f82bf5375ff83778f8d3b50e622 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue at google.com>
Date: Fri, 22 May 2026 18:28:03 -0400
Subject: [PATCH 1/2] [libc] Use containers for overlay precommit CIs.
---
.github/workflows/libc-overlay-tests.yml | 38 ++++++++++--------------
1 file changed, 16 insertions(+), 22 deletions(-)
diff --git a/.github/workflows/libc-overlay-tests.yml b/.github/workflows/libc-overlay-tests.yml
index dedabb559e699..4b66c1232f2c0 100644
--- a/.github/workflows/libc-overlay-tests.yml
+++ b/.github/workflows/libc-overlay-tests.yml
@@ -13,6 +13,8 @@ jobs:
if: github.repository_owner == 'llvm'
timeout-minutes: 30
runs-on: ${{ matrix.os }}
+ container:
+ image: ${{ matrix.container }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
fail-fast: false
@@ -21,22 +23,27 @@ jobs:
include:
# TODO: add linux gcc when it is fixed
- os: ubuntu-24.04
+ container: 'ghcr.io/llvm/libc-ubuntu-24.04:70cbd7591abe'
compiler:
- c_compiler: clang
- cpp_compiler: clang++
+ c_compiler: clang-23
+ cpp_compiler: clang++-23
- os: ubuntu-24.04-arm
+ container: 'ghcr.io/llvm/arm64v8/libc-ubuntu-24.04:70cbd7591abe'
compiler:
- c_compiler: clang
- cpp_compiler: clang++
+ c_compiler: clang-23
+ cpp_compiler: clang++-23
- os: windows-2022
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
+ container: null
- os: windows-2025
+ container: null
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: macos-15
+ container: null
compiler:
c_compiler: clang
cpp_compiler: clang++
@@ -60,13 +67,6 @@ jobs:
key: libc_overlay_build_v2_${{ matrix.os }}_${{ matrix.compiler.c_compiler }}
variant: sccache
- # MPFR is required by some of the mathlib tests.
- - name: Prepare dependencies (Ubuntu)
- if: runner.os == 'Linux'
- run: |
- sudo apt-get update
- sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build
-
# Chocolatey is shipped with Windows runners. Windows Server 2025 recommends WinGet.
# Consider migrating to WinGet when Windows Server 2025 is available.
- name: Prepare dependencies (Windows)
@@ -79,21 +79,15 @@ jobs:
run: |
brew install ninja
- - name: Set reusable strings
- id: strings
- shell: bash
- run: |
- echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
-
# Use MinSizeRel to reduce the size of the build.
# Notice that CMP0141=NEW and MSVC_DEBUG_INFORMATION_FORMAT=Embedded are required
# by the sccache tool.
- name: Configure CMake
run: >
- cmake -B ${{ steps.strings.outputs.build-output-dir }}
+ cmake -B build
-DCMAKE_CXX_COMPILER=${{ matrix.compiler.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.compiler.c_compiler }}
- -DCMAKE_BUILD_TYPE=Debug
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-DCMAKE_POLICY_DEFAULT_CMP0141=NEW
@@ -101,18 +95,18 @@ jobs:
-DLIBC_COMPILE_OPTIONS_NATIVE=""
-DLLVM_ENABLE_RUNTIMES=libc
-G Ninja
- -S ${{ github.workspace }}/runtimes
+ -S runtimes
- name: Build
run: >
cmake
- --build ${{ steps.strings.outputs.build-output-dir }}
+ --build build
--parallel
--target libc
- name: Test
run: >
cmake
- --build ${{ steps.strings.outputs.build-output-dir }}
+ --build build
--parallel
--target check-libc
>From d6ada48297c73349f72e6bf645993527ccef52fa Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue at google.com>
Date: Sun, 24 May 2026 12:30:58 -0400
Subject: [PATCH 2/2] Try to set container directly, as windows environment
changes when `container` is set.
---
.github/workflows/libc-overlay-tests.yml | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/.github/workflows/libc-overlay-tests.yml b/.github/workflows/libc-overlay-tests.yml
index 4b66c1232f2c0..2e2885a4b87d5 100644
--- a/.github/workflows/libc-overlay-tests.yml
+++ b/.github/workflows/libc-overlay-tests.yml
@@ -13,8 +13,7 @@ jobs:
if: github.repository_owner == 'llvm'
timeout-minutes: 30
runs-on: ${{ matrix.os }}
- container:
- image: ${{ matrix.container }}
+ container: ${{ matrix.container || null }}
strategy:
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations.
fail-fast: false
@@ -36,14 +35,11 @@ jobs:
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- container: null
- os: windows-2025
- container: null
compiler:
c_compiler: clang-cl
cpp_compiler: clang-cl
- os: macos-15
- container: null
compiler:
c_compiler: clang
cpp_compiler: clang++
More information about the llvm-commits
mailing list