[llvm-branch-commits] [llvm] [libc] Build fuzzing tests in pre-merge CI tests (PR #185018)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Mar 6 08:30:26 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Victor Campos (vhscampos)

<details>
<summary>Changes</summary>

At the moment, no CI job tests whether the fuzzing tests build correctly.

This patch adds the build of fuzzing tests to the pre-merge CI job.

In addition, it removes one outdated comment about the build type used and changes the action to run on all branches, not only on PRs that target main.

If we limit it to run only on PRs to the main branch, it will not run on stacked PRs. I believe it is also okay to run it on PRs to release branches. Therefore the limit seemed too strict.

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


1 Files Affected:

- (modified) .github/workflows/libc-fullbuild-tests.yml (+26-8) 


``````````diff
diff --git a/.github/workflows/libc-fullbuild-tests.yml b/.github/workflows/libc-fullbuild-tests.yml
index c796196b2180f..f23abb4e1d3d0 100644
--- a/.github/workflows/libc-fullbuild-tests.yml
+++ b/.github/workflows/libc-fullbuild-tests.yml
@@ -4,7 +4,6 @@ permissions:
   contents: read
 on:
   pull_request:
-    branches: [ "main" ]
     paths:
       - 'libc/**'
       - '.github/workflows/libc-fullbuild-tests.yml'
@@ -31,66 +30,77 @@ jobs:
             cpp_compiler: clang++-21
             target: x86_64-unknown-linux-llvm
             include_scudo: ON
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: Release
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: x86_64-unknown-linux-llvm
             include_scudo: ON
+            build_fuzzing_tests: ON
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: x86_64-unknown-linux-llvm
             include_scudo: ON
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04-arm
             build_type: Debug
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: aarch64-unknown-linux-llvm
             include_scudo: ON
+            build_fuzzing_tests: ON
           - os: ubuntu-24.04
             build_type: Debug
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: x86_64-unknown-uefi-llvm
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: armv6m-none-eabi
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: armv7m-none-eabi
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: armv7em-none-eabi
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: armv8m.main-none-eabi
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: armv8.1m.main-none-eabi
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           - os: ubuntu-24.04
             build_type: MinSizeRel
             c_compiler: clang-21
             cpp_compiler: clang++-21
             target: riscv32-unknown-elf
             include_scudo: OFF
+            build_fuzzing_tests: OFF
           # TODO: add back gcc build when it is fixed
           # - c_compiler: gcc
           #   cpp_compiler: g++
@@ -118,7 +128,6 @@ jobs:
         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.
     - name: Configure CMake
       run: |
         export RUNTIMES="libc"
@@ -135,8 +144,11 @@ jobs:
           -DCMAKE_CXX_COMPILER_LAUNCHER=sccache
           -DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-install-dir }}"
 
-        if [[ ${{ matrix.include_scudo}} == "ON" ]]; then
+        if [[ "${{ matrix.include_scudo }}" == "ON" || "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
           export RUNTIMES="$RUNTIMES;compiler-rt"
+        fi
+
+        if [[ "${{ matrix.include_scudo }}" == "ON" ]]; then
           export CMAKE_FLAGS="$CMAKE_FLAGS
             -DLLVM_LIBC_INCLUDE_SCUDO=ON
             -DCOMPILER_RT_BUILD_SCUDO_STANDALONE_WITH_LLVM_LIBC=ON
@@ -158,11 +170,17 @@ jobs:
         esac
 
     - name: Build
-      run: >
-        cmake 
-        --build ${{ steps.strings.outputs.build-output-dir }} 
-        --parallel
-        --target install
+      shell: bash
+      run: |
+        TARGETS="install"
+        if [[ "${{ matrix.build_fuzzing_tests }}" == "ON" ]]; then
+          TARGETS="$TARGETS libc-fuzzer"
+        fi
+
+        cmake \
+          --build ${{ steps.strings.outputs.build-output-dir }} \
+          --parallel \
+          --target $TARGETS
 
     - name: Test
       # Skip UEFI and baremetal tests until we have testing set up.

``````````

</details>


https://github.com/llvm/llvm-project/pull/185018


More information about the llvm-branch-commits mailing list