Skip to content

Commit

Permalink
ci_build.sh: introduce shortcut for BUILD_TYPE=fightwarn-all
Browse files Browse the repository at this point in the history
  • Loading branch information
jimklimov committed Mar 31, 2022
1 parent 0be7c92 commit 6b787c1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,29 @@ set -e
# CI_REQUIRE_GOOD_GITIGNORE="false" CI_FAILFAST=true DO_CLEAN_CHECK=no BUILD_TYPE=fightwarn ./ci_build.sh
case "$BUILD_TYPE" in
fightwarn) ;; # for default compiler
fightwarn-all)
# This recipe allows to test with different (default-named)
# compiler suites if available. Primary goal is to see whether
# everything is building ok on a given platform, with one shot.
TRIED_BUILD=false
if (command -v gcc) >/dev/null ; then
TRIED_BUILD=true
BUILD_TYPE=fightwarn-gcc "$0" || exit
else
echo "SKIPPING BUILD_TYPE=fightwarn-gcc: compiler not found" >&2
fi
if (command -v clang) >/dev/null ; then
TRIED_BUILD=true
BUILD_TYPE=fightwarn-clang "$0" || exit
else
echo "SKIPPING BUILD_TYPE=fightwarn-clang: compiler not found" >&2
fi
if ! $TRIED_BUILD ; then
echo "FAILED to run: no default-named compilers were found" >&2
exit 1
fi
exit 0
;;
fightwarn-gcc)
CC="gcc"
CXX="g++"
Expand Down

0 comments on commit 6b787c1

Please sign in to comment.