File indexing completed on 2024-09-01 04:30:01
0001 #!/bin/bash -fxv 0002 # NOTE #!/bin/bash -fxv prints all executed commands. 0003 0004 # SPDX-FileCopyrightText: Lukas Sommer <sommerluk@gmail.com> 0005 # SPDX-License-Identifier: BSD-2-Clause OR MIT 0006 0007 0008 0009 0010 0011 # -e exits on error, 0012 # -u errors on undefined variables, 0013 # and -o (for option) pipefail exits on command pipe failures 0014 set -euo pipefail 0015 errorcount=0 0016 0017 echo "Dynamic codecheck against Qt6 started." 0018 # The “.” command will execute the given script within the context of 0019 # the current script, which is necessary in order to preserve the 0020 # environment variables that are set by the given script. 0021 . scripts/export-environment.sh 0022 echo Number of available CPU threads: $PARALLEL_PROCESSES 0023 rm --recursive --force build 0024 mkdir --parents build 0025 cd build 0026 # iwyu is based on clang internals, therefore forcing usage of clang. 0027 cmake \ 0028 -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ 0029 -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu \ 0030 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=FALSE \ 0031 -DBUILD_WITH_QT6=ON \ 0032 .. 0033 cmake --build . --parallel $PARALLEL_PROCESSES 2>../artifact_iwyu.txt 0034 make install 0035 cd .. 0036 rm --recursive --force buildexamples 0037 mkdir --parents buildexamples 0038 cd buildexamples 0039 # iwyu is based on clang internals, therefore forcing usage of clang. 0040 cmake \ 0041 -DCMAKE_CXX_COMPILER=/usr/bin/clang++ \ 0042 -DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=/usr/bin/iwyu \ 0043 -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=FALSE \ 0044 -DBUILD_WITH_QT6=ON \ 0045 ../examples 0046 cmake --build . --parallel $PARALLEL_PROCESSES 2>>../artifact_iwyu.txt 0047 cd .. 0048 [ -s artifact_iwyu.txt ] && ((errorcount++)) 0049 echo "Dynamic codecheck against Qt6 finished." 0050 0051 echo Terminating continuous integration with exit code $errorcount. 0052 # NOTE The exit code of the last command is available with $? in the shell. 0053 exit $errorcount