diff options
author | jak1 <jak1@themanaworld.org> | 2023-04-07 16:51:54 +0200 |
---|---|---|
committer | jak1 <jak1@themanaworld.org> | 2023-04-07 16:52:34 +0200 |
commit | a6006f9c59dccb6af4bf9b3e192bdb829c54fe87 (patch) | |
tree | 4df48d2b9ee14d51d0d6428436c49ed29f4395cb /tools/ci/scripts/init.sh | |
parent | 279c7ba28804960ae3b2ec0753b4c3a92d5a6ede (diff) | |
download | mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.gz mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.bz2 mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.tar.xz mv-a6006f9c59dccb6af4bf9b3e192bdb829c54fe87.zip |
sorting CI:
moved disabled jobs to 'tools/ci/disabled.gitlab-ci.yml'
added check before rm, removes a lot unnecessary noise form pipeline output (req. init.sh)
added N_RUNS to runtests.sh (without arg it runs 3 times the tests, given amount otherwise)
added gcc-12 job
Diffstat (limited to 'tools/ci/scripts/init.sh')
-rwxr-xr-x | tools/ci/scripts/init.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/tools/ci/scripts/init.sh b/tools/ci/scripts/init.sh index f427be910..92becc23b 100755 --- a/tools/ci/scripts/init.sh +++ b/tools/ci/scripts/init.sh @@ -3,7 +3,13 @@ export dir=$(pwd) export ERRFILE=${dir}/logs/${LOGFILE} -rm ${ERRFILE} +function silent_rm { + if [[ -f "$1" ]]; then + rm "$1" + fi +} + +silent_rm ${ERRFILE} function do_init { $CC --version @@ -147,11 +153,11 @@ function check_error { } function run_configure_simple { - rm $ERRFILE + silent_rm $ERRFILE echo "autoreconf -i" autoreconf -i 2>$ERRFILE check_error $? - rm $ERRFILE + silent_rm $ERRFILE echo "./configure $*" ./configure $* 2>$ERRFILE check_error $? @@ -160,14 +166,14 @@ function run_configure_simple { function run_configure { run_configure_simple $* - rm $ERRFILE + silent_rm $ERRFILE cd po echo "make update-gmo" make update-gmo 2>$ERRFILE check_error $? cd .. - rm $ERRFILE + silent_rm $ERRFILE cd po echo "make update-po" make update-po 2>$ERRFILE @@ -176,14 +182,14 @@ function run_configure { } function run_cmake { - rm $ERRFILE + silent_rm $ERRFILE echo "cmake ." cmake . 2>$ERRFILE check_error $? } function run_make { - rm $ERRFILE + silent_rm $ERRFILE if [ "$JOBS" == "" ]; then export JOBS=2 echo "No JOBS defined" @@ -196,7 +202,7 @@ function run_make { } function run_make_check { - rm $ERRFILE + silent_rm $ERRFILE if [ "$JOBS" == "" ]; then export JOBS=2 echo "No JOBS defined" @@ -256,7 +262,7 @@ function run_check_warnings { } function run_h { - rm $ERRFILE + silent_rm $ERRFILE echo "$CC -c -x c++ $* $includes */*/*/*/*.h */*/*/*.h */*/*.h */*.h *.h" $CC -c -x c++ $* $includes */*/*/*/*.h */*/*/*.h */*/*.h */*.h *.h 2>$ERRFILE DATA=$(cat $ERRFILE) @@ -268,7 +274,7 @@ function run_h { } function run_tarball { - rm $ERRFILE + silent_rm $ERRFILE echo "make dist-xz" make dist-xz 2>$ERRFILE check_error $? @@ -281,7 +287,7 @@ function run_tarball { } function run_mplint { - rm $ERRFILE + silent_rm $ERRFILE echo "mplint/src/mplint $*" mplint/src/mplint $* \ | grep -v "src/unittests/doctest.h" \ |