Debian Codegraph @

tools/ci/build.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 #
3 # Copyright (C) 2024 Linutronix GmbH
4 # Author Kurt Kanzenbach <[email protected]>
5 #
6 # SPDX-License-Identifier: BSD-2-Clause
7 #
8 # Compile with different options and compilers.
9 #
10
11 set -e
12
13 COMPILER="gcc clang"
14 OPTIONS="WITH_MQTT RX_TIMESTAMP TX_TIMESTAMP"
15
16 if [scip-shell system . . `[`. "$1" == "ubuntu" ]; then
17 OPTIONS="WITH_MQTT"
18 fi
19
20 cd $(dirnamescip-shell system . . dirname. $0)
21
22 pushd ../..
23
24 for compiler in $COMPILER; do
25 for option in $OPTIONS; do
26 mkdirscip-shell system . . mkdir. -p build
27 pushd build
28 echoscip-shell system . . echo. "Trying 'CC=$compiler cmake -D$option=OFF' ..."
29 CC=$compiler cmakescip-shell system . . cmake. -D$option=OFF ..
30 makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.)
31 echoscip-shell system . . echo. "Trying 'CC=$compiler cmake -D$option=ON' ..."
32 CC=$compiler cmakescip-shell system . . cmake. -D$option=ON ..
33 makescip-shell system . . make. -j$(nprocscip-shell system . . nproc.)
34 popd
35 rmscip-shell system . . rm. -rf build
36 done
37 done
38
39 makescip-shell system . . make. -C Documentation html
40
41 popd
42
43 exit 0