2525 - uses : actions/checkout@v4
2626 with :
2727 lfs : true
28+ - uses : extractions/setup-just@v3
2829
2930 # Skip installing package docs to avoid wasting time when installing build dependencies
3031 # See: https://github.com/actions/runner-images/issues/10977#issuecomment-2810713336
@@ -37,15 +38,24 @@ jobs:
3738 path-exclude /usr/share/info/*
3839 EOF
3940
41+ - name : Cache Valgrind build
42+ uses : actions/cache@v4
43+ id : valgrind-cache
44+ with :
45+ path : /tmp/valgrind-upstream
46+ key : valgrind-${{ matrix.valgrind }}-${{ runner.os }}-build
47+
4048 # Build and install Valgrind
4149 - name : Update apt-get cache
42- run : sudo apt-get update
50+ if : steps.valgrind-cache.outputs.cache-hit != 'true'
51+ run : |
52+ sudo apt-get update
4353
44- # Remove any existing Valgrind installation to avoid conflicts
45- - name : Remove existing Valgrind installation
46- run : sudo apt-get remove -y valgrind || true
54+ # Remove existing Valgrind installation
55+ sudo apt-get remove -y valgrind || true
4756
4857 - name : Install build dependencies
58+ if : steps.valgrind-cache.outputs.cache-hit != 'true'
4959 run : |
5060 sudo apt-get install -y \
5161 build-essential \
5868 docbook-xml \
5969 xsltproc
6070
61- - uses : extractions/setup-just@v3
6271 - name : Build Valgrind (${{ matrix.valgrind }})
72+ if : steps.valgrind-cache.outputs.cache-hit != 'true'
6373 run : just build ${{ matrix.valgrind }}
6474
6575 - name : Verify Valgrind build
7787 CODSPEED_PERF_ENABLED : false
7888 with :
7989 mode : walltime
80- run : ./bench/bench.py --cmd ${{ matrix.cmd }} --valgrind-path /usr/local/bin/valgrind
90+ run : ./bench/bench.py --cmd " ${{ matrix.cmd }}" --valgrind-path /usr/local/bin/valgrind
0 commit comments