lean4-htt/tests/bench_build.sh
Henrik Böving aa6fa1cf1a
chore: use the lean-llvm LLVM for benchmarking (#13634)
This PR makes radar use the LLVM that we actually ship to users (stored
at https://github.com/leanprover/lean-llvm). In doing so it also makes
the lake build compatible with lean-llvm, allowing us to do potential
release builds with lake in the future.
2026-05-05 14:26:08 +00:00

29 lines
897 B
Bash
Executable file

#!/usr/bin/env nix
#! nix develop ..#oldGlibc --command /usr/bin/env bash
# This script must be called from the repo root.
# The radar environment variables must be provided.
# See also the https://github.com/leanprover/radar readme.
LLVM_RELEASE=19.1.2
LLVM_TARBALL="$RADAR_CACHE/llvm/$LLVM_RELEASE.tar.zst"
if [ ! -f "$LLVM_TARBALL" ]; then
mkdir -p "$RADAR_CACHE/llvm"
curl --location -o "$LLVM_TARBALL" "https://github.com/leanprover/lean-llvm/releases/download/$LLVM_RELEASE/lean-llvm-x86_64-linux-gnu.tar.zst"
fi
mkdir -p build/release
cd build/release
eval cmake ../.. \
--preset release $(../../script/prepare-llvm-linux.sh $LLVM_TARBALL) \
-DWFAIL=OFF
rm -rf stage2
cp -r stage1 stage2
rm -rf stage3
cp -r stage1 stage3
cd ../..
make -C build/release -j"$(nproc)" bench-part1
mv tests/part1.measurements.jsonl "$RADAR_OUT"
tests/bench/build/lakeprof_report_upload.py