ci: unprivileged jobs; toolchain default linker, valgrind built from source and cached; budgets re-pinned for the CI image
6684ede5309dfaff493d5486faeadfac126d2c9e
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: a39233868614
There are many coding harnesses - but this one is fast
6684ede5309dfaff493d5486faeadfac126d2c9e
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+37 / −46 text lines
+3 / −3 text lines
+0 / −1 text lines
+0 / −1 text lines
+8 / −2 text lines
run "apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq mold valgrind" cache "valgrind" { path "target/tools/valgrind" key { file ".ci/nightly.kdl" } } run "V=$PWD/target/tools/valgrind; test -x $V/bin/valgrind || (mkdir -p target/tools/src && curl -sSL https://sourceware.org/pub/valgrind/valgrind-3.25.1.tar.bz2 | tar -xj -C target/tools/src && cd target/tools/src/valgrind-3.25.1 && ./configure -q --prefix=$V >/dev/null && make -s -j$(nproc) >/dev/null && make -s install >/dev/null)"+8 / −2 text lines
run "apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq mold valgrind" cache "valgrind" { path "target/tools/valgrind" key { file ".ci/perf.kdl" } } run "V=$PWD/target/tools/valgrind; test -x $V/bin/valgrind || (mkdir -p target/tools/src && curl -sSL https://sourceware.org/pub/valgrind/valgrind-3.25.1.tar.bz2 | tar -xj -C target/tools/src && cd target/tools/src/valgrind-3.25.1 && ./configure -q --prefix=$V >/dev/null && make -s -j$(nproc) >/dev/null && make -s install >/dev/null)"+8 / −2 text lines
run "apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq mold valgrind" cache "valgrind" { path "target/tools/valgrind" key { file ".ci/report.kdl" } } run "V=$PWD/target/tools/valgrind; test -x $V/bin/valgrind || (mkdir -p target/tools/src && curl -sSL https://sourceware.org/pub/valgrind/valgrind-3.25.1.tar.bz2 | tar -xj -C target/tools/src && cd target/tools/src/valgrind-3.25.1 && ./configure -q --prefix=$V >/dev/null && make -s -j$(nproc) >/dev/null && make -s install >/dev/null)"+1 / −1 text lines
Startup counts include the dynamic loader; every bench includes libc `malloc` and `memcpy`, whose implementations differ per glibc release.Consequence: pins carry the platform (`# Pinned with <rustc> | glibc <v>`); the gate applies only on that platform, other hosts only report; pins are taken inside the CI image.Inside the container `setarch` cannot disable ASLR, so the runner always gets `--allow-aslr=true`; with cache simulation off the counts stayed within band across repeated container runs.The CI image also lacks `mold`, which `.cargo/config.toml` requires; every job installs `mold` (and `valgrind` where callgrind runs) first.Luci job containers are unprivileged: no `apt-get`. The repo therefore links with the toolchain default (mold stays a machine preference in `~/.cargo/config.toml`, whose target table composes with the repo's universal table), and the callgrind jobs build valgrind 3.25.1 from source into `target/tools/valgrind` (≈ 3 min, Luci-cached on the job file). Pins were re-taken with that exact setup; linker choice shifts counts, so pins never move without the platform line.+9 / −9 text lines
"instructions::agent::run_turn::history_1000_masked" = { ir = 11384108 }"instructions::providers::sse::anthropic" = { ir = 119257 }"instructions::providers::sse::gemini" = { ir = 52389 }"instructions::providers::sse::openai" = { ir = 89745 }"instructions::rpc::handle_line::ping" = { ir = 8428 }"instructions::session::canonical_json::nested" = { ir = 1122300 }"instructions::agent::run_turn::history_1000_masked" = { ir = 11353714 }"instructions::providers::sse::anthropic" = { ir = 119117 }"instructions::providers::sse::gemini" = { ir = 52409 }"instructions::providers::sse::openai" = { ir = 89657 }"instructions::rpc::handle_line::ping" = { ir = 8421 }"instructions::session::canonical_json::nested" = { ir = 1121818 }+0 / −25 text lines
ensure_mold,/// mold is a build prerequisite on linux-gnu `x86_64`; xtask verifies it, the/// system package manager installs it.fn ensure_mold(_extra: &[OsString]) -> ExitCode { if cfg!(all( target_arch = "x86_64", target_os = "linux", target_env = "gnu" )) { match Command::new("mold") .arg("--version") .stdout(std::process::Stdio::null()) .stderr(std::process::Stdio::null()) .status() { Ok(status) if status.success() => ExitCode::SUCCESS, _ => fail( "mold linker missing: install it with the system package manager (e.g. pacman -S mold)\n", ), } } else { ExitCode::SUCCESS }}