Skip to content

Commit

Permalink
ci: add horrible hack to retry compilation on failure
Browse files Browse the repository at this point in the history
it seems there's some race condition in the build system,
and the gen_init_cpio step fails on occasion.

because make is incremental, when the build is restarted it'll pick
straight back up at the failed step, and the problem will resolve.

a hacky fix sure, but good enough for now.
  • Loading branch information
tombl committed Jan 19, 2025
1 parent f10c2d7 commit 26f629a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,14 @@

enableParallelBuilding = true;
configurePhase = "make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES defconfig";
buildPhase = "make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES -C tools/wasm";
buildPhase = "
# this is a horrible dirty hack but there's some non-deterministic build failure
for i in $(seq 1 3); do
if make HOSTCC=$HOSTCC -j$NIX_BUILD_CORES -C tools/wasm; then
break
fi
done
";
installPhase = ''cp -r tools/wasm/dist $out'';
};
}
Expand Down

0 comments on commit 26f629a

Please sign in to comment.