Skip to content

[Github][libc] Use a container for fullbuild tests#181436

Merged
boomanaiden154 merged 9 commits intollvm:mainfrom
boomanaiden154:libc-fullbuild-container
Feb 15, 2026
Merged

[Github][libc] Use a container for fullbuild tests#181436
boomanaiden154 merged 9 commits intollvm:mainfrom
boomanaiden154:libc-fullbuild-container

Conversation

@boomanaiden154
Copy link
Contributor

@boomanaiden154 boomanaiden154 commented Feb 13, 2026

This avoids needing to set up deps every time and avoids failures due to failed dependency installation.

Closed #150490.

This avoids needing to set up deps every time and avoids failures due to
failed dependency installation.
@boomanaiden154 boomanaiden154 force-pushed the libc-fullbuild-container branch from 5561028 to 74f98fd Compare February 13, 2026 23:47
@llvmbot
Copy link
Member

llvmbot commented Feb 14, 2026

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This avoids needing to set up deps every time and avoids failures due to failed dependency installation.

Closed #150490.


Full diff: https://github.com/llvm/llvm-project/pull/181436.diff

1 Files Affected:

  • (modified) .github/workflows/libc-fullbuild-tests.yml (+11-17)
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index d9445a6407ccf..c796196b2180f 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -12,6 +12,13 @@ on:
 jobs:
   build:
     runs-on: ${{ matrix.os }}
+    container:
+      image: ${{ (startsWith(matrix.os, 'ubuntu-24.04-arm') && 'ghcr.io/llvm/arm64v8/libc-ubuntu-24.04') || 'ghcr.io/llvm/libc-ubuntu-24.04'}}
+      # We need to enable privileged containers so that certain libc tests
+      # have the necessary permissions (like SYS_TIME). There are no security
+      # implications as we are already running in an isolated VM.
+      options: >-
+        --privileged
     strategy:
       fail-fast: false
       matrix:
@@ -102,26 +109,13 @@ jobs:
         max-size: 1G
         key: libc_fullbuild_${{ matrix.c_compiler }}
         variant: sccache
-    
-    # Notice:
-    # - MPFR is required by some of the mathlib tests.
-    # - Debian has a multilib setup, so we need to symlink the asm directory.
-    #   For more information, see https://wiki.debian.org/Multiarch/LibraryPathOverview
-    - name: Prepare dependencies (Ubuntu)
-      run: |
-        wget https://apt.llvm.org/llvm.sh
-        chmod +x llvm.sh
-        sudo ./llvm.sh 21
-        sudo apt-get update
-        sudo apt-get install -y libmpfr-dev libgmp-dev libmpc-dev ninja-build linux-libc-dev
-        sudo ln -sf /usr/include/$(uname -p)-linux-gnu/asm /usr/include/asm
 
     - name: Set reusable strings
       id: strings
       shell: bash
       run: |
-        echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
-        echo "build-install-dir=${{ github.workspace }}/install" >> "$GITHUB_OUTPUT"
+        echo "build-output-dir=/__w/llvm-project/llvm-project/build" >> "$GITHUB_OUTPUT"
+        echo "build-install-dir=/__w/llvm-project/llvm-project/install" >> "$GITHUB_OUTPUT"
     
     # Configure libc fullbuild with scudo.
     # Use MinSizeRel to reduce the size of the build.
@@ -131,7 +125,7 @@ jobs:
 
         export CMAKE_FLAGS="
           -G Ninja
-          -S ${{ github.workspace }}/runtimes
+          -S /__w/llvm-project/llvm-project/runtimes
           -B ${{ steps.strings.outputs.build-output-dir }}
           -DCMAKE_ASM_COMPILER=${{ matrix.c_compiler }}
           -DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
@@ -153,7 +147,7 @@ jobs:
         case "${{ matrix.target }}" in
           *-none-eabi|riscv32-unknown-elf)
             cmake $CMAKE_FLAGS \
-              -C ${{ github.workspace }}/libc/cmake/caches/${{ matrix.target }}.cmake
+              -C /__w/llvm-project/llvm-project/libc/cmake/caches/${{ matrix.target }}.cmake
             ;;
           *)
             cmake -DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \

Copy link
Contributor

@SchrodingerZhu SchrodingerZhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@boomanaiden154 boomanaiden154 merged commit b196067 into llvm:main Feb 15, 2026
26 checks passed
@boomanaiden154 boomanaiden154 deleted the libc-fullbuild-container branch February 15, 2026 18:13
manasij7479 pushed a commit to manasij7479/llvm-project that referenced this pull request Feb 18, 2026
This avoids needing to set up deps every time and avoids failures due to
failed dependency installation.

Closed llvm#150490.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a docker container for libc premerge tests

3 participants