matrix-tuwunel: build tests in debug profile

(cherry picked from commit 24bb6a0c44)
This commit is contained in:
Alexandru Scvorțov 2026-06-06 11:10:16 +03:00 committed by github-actions[bot]
commit e193635f72

View file

@ -150,6 +150,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
libredirect.hook
];
# Make sure tuwunel doesn't try to write to arbitrary
# directories or have DNS timeouts during `cargo test`.
preCheck =
let
fakeResolvConf = writeTextFile {
@ -163,8 +165,17 @@ rustPlatform.buildRustPackage (finalAttrs: {
export NIX_REDIRECTS="/etc/resolv.conf=${fakeResolvConf}"
export TUWUNEL_DATABASE_PATH="$(mktemp -d)/smoketest.db"
'';
doCheck = true;
# 2026-06-24: Tuwunel has 16 integration tests. Cargo turns each of these
# into a separate binary that links in all 110 MB worth of tuwunel. Linking
# 16 big binaries like this takes a really long time and was causing Hydra
# to time out the build during `checkPhase`. So, we run the checks in the
# "debug" profile. This reduces the build+test time on my machine from
# 44min to 12min.
checkType = "debug";
passthru = {
rocksdb = rocksdb'; # make used rocksdb version available (e.g., for backup scripts)
updateScript = nix-update-script { };