ci.sh tries `make binary-dist-prep` even when `make all` fails
Often when the validate jobs fail I don’t find the failure at the end, but have to scroll up past many lines of tar
complaining about missing files and other things, often further than visible in the non-raw view, e.g. in https://gitlab.haskell.org/ghc/ghc/-/jobs/897731
The interesting lines seem to be
Please report this as a GHC bug: https://www.haskell.org/ghc/reportabug
<<ghc: 152407984 bytes, 36 GCs, 11401801/30518944 avg/max bytes residency (5 samples), 59M in use, 0.000 INIT (0.000 elapsed), 0.122 MUT (0.121 elapsed), 0.209 GC (0.209 elapsed) :ghc>>
compiler/ghc.mk:242: recipe for target 'compiler/stage2/build/GHC/Types/Name/Occurrence.p_o' failed
make[1]: *** [compiler/stage2/build/GHC/Types/Name/Occurrence.p_o] Error 1
make[1]: *** Waiting for unfinished jobs....
<<ghc: 86967936 bytes, 21 GCs, 6151580/13110480 avg/max bytes residency (4 samples), 62M in use, 0.001 INIT (0.000 elapsed), 0.081 MUT (0.132 elapsed), 0.132 GC (0.132 elapsed) :ghc>>
make: *** [all] Error 2
Makefile:123: recipe for target 'all' failed
[0;31mmake -j8 -Werror V=0 failed[0m
[1;34mRunning make -j8 binary-dist-prep TAR_COMP_OPTS=-1...[0m
rm -f bindist-list
make --no-print-directory -f ghc.mk bindist-list BINDIST=YES
for f in LICENSE; do echo ghc-9.3.20220102/$f >> bindist-list; done
for f in README; do echo ghc-9.3.20220102/$f >> bindist-list; done
it seems that the ci.sh
script tries make -j8 binary-dist-prep TAR_COMP_OPTS=-1
even if make -j8 -Werror V=0
failed.
The relevant lines seem to be
function build_make() {
prepare_build_mk
if [[ -z "$BIN_DIST_PREP_TAR_COMP" ]]; then
fail "BIN_DIST_PREP_TAR_COMP is not set"
fi
if [[ -n "${VERBOSE:-}" ]]; then
MAKE_ARGS="${MAKE_ARGS:-} V=1"
else
MAKE_ARGS="${MAKE_ARGS:-} V=0"
fi
run "$MAKE" -j"$cores" "$MAKE_ARGS"
run "$MAKE" -j"$cores" binary-dist-prep TAR_COMP_OPTS=-1
ls -lh "$BIN_DIST_PREP_TAR_COMP"
}
Is that intentional?