summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Marquess <pmqs@outlook.com>2026-02-15 16:18:59 +0000
committerHans Kristian Rosbach <hk-github@circlestorm.org>2026-03-11 21:45:05 +0100
commit94ed7d523a0987e7bb47e9423bb62b09d401806b (patch)
treec5b6e28371f6fc8b03c93a38e87ebd3cfc7a64ac
parent702db8b849581b0bb47f59c1b1dd887b6349d963 (diff)
downloadProject-Tick-94ed7d523a0987e7bb47e9423bb62b09d401806b.tar.gz
Project-Tick-94ed7d523a0987e7bb47e9423bb62b09d401806b.zip
Cache LLVM C++ libraries for MSAN
-rw-r--r--.github/workflows/cmake.yml28
1 files changed, 25 insertions, 3 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index a19128bebc..f1aff1ceda 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -469,6 +469,7 @@ jobs:
cmake-args: -GNinja -DWITH_SANITIZER=Memory
packages: ninja-build clang-20 llvm-20 libclang-rt-20-dev
gcov-exec: llvm-cov-20 gcov
+ build-config: Debug
# https://github.com/llvm/llvm-project/issues/55785
msan-options: use_sigaltstack=0
# Coverage disabled for clang-20, errors
@@ -822,8 +823,30 @@ jobs:
if: contains(matrix.packages, 'wine')
run: wineboot --init
+ - name: Set LLVM_BUILD_DIR for LLVM C++ libraries (MSAN)
+ if: contains(matrix.name, 'MSAN') && startsWith(matrix.compiler, 'clang')
+ run: |
+ echo "LLVM_BUILD_DIR=`pwd`/llvm-project/build" >> $GITHUB_ENV
+
+ - name: Get latest hash change for LLVM C++ libraries (MSAN)
+ if: contains(matrix.name, 'MSAN') && startsWith(matrix.compiler, 'clang')
+ id: llvm-remote-hash
+ run: |
+ HASH=$(git ls-remote https://github.com/llvm/llvm-project refs/heads/release/20.x | cut -f1)
+ echo "value=$HASH" >> $GITHUB_OUTPUT
+
+ - name: Cache LLVM C++ libraries (MSAN)
+ if: contains(matrix.name, 'MSAN') && startsWith(matrix.compiler, 'clang')
+ id: cache-llvm
+ uses: actions/cache@v5
+ with:
+ path: |
+ ${{ env.LLVM_BUILD_DIR }}/lib
+ ${{ env.LLVM_BUILD_DIR }}/include
+ key: cache-llvm-${{ matrix.os }}-${{ runner.arch }}-${{ matrix.compiler }}-${{ steps.llvm-remote-hash.outputs.value }}
+
- name: Compile LLVM C++ libraries (MSAN)
- if: contains(matrix.name, 'MSAN')
+ if: contains(matrix.name, 'MSAN') && startsWith(matrix.compiler, 'clang') && steps.cache-llvm.outputs.cache-hit != 'true'
run: |
# Use sparse-checkout to download only the folders we need (176MB instead of 2302MB)
git clone --depth=1 --filter=blob:none https://github.com/llvm/llvm-project --no-checkout --branch release/20.x
@@ -840,7 +863,6 @@ jobs:
-DLLVM_INCLUDE_TESTS=OFF \
-DLLVM_INCLUDE_DOCS=OFF
cmake --build build -j5 -- cxx cxxabi
- echo "LLVM_BUILD_DIR=`pwd`/build" >> $GITHUB_ENV
env:
CFLAGS: -O2
CC: ${{ matrix.compiler }}
@@ -870,7 +892,7 @@ jobs:
- name: Run test cases
# Don't run tests on 32-bit Windows ARM
if: runner.os != 'Windows' || contains(matrix.name, 'ARM') == false || runner.arch == 'ARM64'
- run: ctest --verbose -C Release -E benchmark_zlib --output-on-failure --max-width 120 -j ${{ matrix.parallel-jobs || '5' }}
+ run: ctest --verbose -C ${{ matrix.build-config || 'Release' }} -E benchmark_zlib --output-on-failure --max-width 120 -j ${{ matrix.parallel-jobs || '5' }}
env:
ASAN_OPTIONS: ${{ matrix.asan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1
MSAN_OPTIONS: ${{ matrix.msan-options || 'verbosity=0' }}:abort_on_error=1:halt_on_error=1