ci: Allow the user to force an in-tree cleanup before verification

Introduce the environment option CI_FORCE:
 * ci_verify_configure.sh is known to fail if an existing build
   configuration is found in the top-level directory.
   Setting CI_FORCE=1 will run `make distclean` before verification.
 * ci_verify_makefiles.sh cannot be reliably executed if random
   object files are found in the top-level directory.
   Setting CI_FORCE=1 will run `rm *.o *.obj` before verification.
 * ci_verify_cmake.sh is not known at this time to fail for similar
   reasons; but if it does, we will use CI_FORCE to trigger any
   necessary pre-build cleanup.
This commit is contained in:
Cosmin Truta
2024-02-17 11:56:35 +02:00
parent 0fa3c0f698
commit 72c4520d3c
4 changed files with 44 additions and 14 deletions

View File

@@ -88,6 +88,9 @@ function ci_spawn {
}
# Ensure that the user initialization is correct.
[[ ${CI_FORCE:-0} == [01] ]] || {
ci_err "bad boolean option: \$CI_FORCE: '$CI_FORCE'"
}
[[ ${CI_NO_TEST:-0} == [01] ]] || {
ci_err "bad boolean option: \$CI_NO_TEST: '$CI_NO_TEST'"
}