@@ -15,12 +15,15 @@ jobs:
1515 # IMPORTANT: The binary has to match the architecture of the runner!
1616 benchmark :
1717 - testdata/take_strings-aarch64
18+ valgrind :
19+ - /usr/bin/valgrind
20+ - ../vg-in-place
1821 steps :
1922 - uses : actions/checkout@v4
2023 with :
2124 lfs : true
2225
23- # Skip installing package docs to avoid wasting time when installing valgrind
26+ # Skip installing package docs to avoid wasting time when installing build dependencies
2427 # See: https://github.com/actions/runner-images/issues/10977#issuecomment-2810713336
2528 - name : Skip installing package docs
2629 if : runner.os == 'Linux'
3235 EOF
3336
3437 # Build and install Valgrind
35- #
3638 - name : Update apt-get cache
3739 run : sudo apt-get update
3840
@@ -67,11 +69,19 @@ jobs:
6769 ./vg-in-place --tool=callgrind --help > /dev/null || { echo "callgrind tool not accessible!"; exit 1; }
6870 echo "Valgrind build successful and callgrind tool is accessible"
6971
72+ # Install upstream Valgrind for comparison
73+ - name : Install upstream Valgrind
74+ run : sudo apt-get install -y valgrind
75+
7076 # Setup benchmarks and run them
71- #
7277 - name : Install uv
7378 uses : astral-sh/setup-uv@v5
7479
80+ # Ensure that the runner doesn't install it's own valgrind by linking vg-in-place to /usr/local/bin/valgrind,
81+ # which makes the version check work correctly.
82+ - name : Link vg-in-place to /usr/local/bin/valgrind
83+ run : sudo ln -sf "$PWD/vg-in-place" /usr/local/bin/valgrind
84+
7585 - name : Run the benchmarks
7686 uses : CodSpeedHQ/action@main
7787 env :
8191 with :
8292 working-directory : bench
8393 mode : walltime
84- run : uv run bench.py --binary-path ${{ matrix.benchmark }} --valgrind-path ${{ github.workspace }}/vg-in-place
94+ run : uv run bench.py --binary-path ${{ matrix.benchmark }} --valgrind-path ${{ matrix.valgrind }}
0 commit comments