diff options
Diffstat (limited to 'apps/ci/ci-conf-core.sh')
-rw-r--r-- | apps/ci/ci-conf-core.sh | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/apps/ci/ci-conf-core.sh b/apps/ci/ci-conf-core.sh new file mode 100644 index 0000000000..31ed0a4baf --- /dev/null +++ b/apps/ci/ci-conf-core.sh @@ -0,0 +1,71 @@ +#!/bin/bash + +set -e + +cat >>conf/config.sh <<CONFIG_SH +MTHREADS=$(($(grep -c ^processor /proc/cpuinfo) + 2)) +CWARNINGS=ON +CDEBUG=OFF +CTYPE=Release +CTOOLS_BUILD=all +CSCRIPTS=static +CBUILD_TESTING=ON +CSCRIPTPCH=OFF +CCOREPCH=OFF +CCUSTOMOPTIONS='-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_FLAGS="-Werror" -DCMAKE_CXX_FLAGS="-Werror"' +DB_CHARACTERS_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';" +DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';" +DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='root'; MYSQL_HOST='localhost';" +CONFIG_SH + +case $COMPILER in + + # this is in order to use the "default" gcc version of the OS, without forcing a specific version + "gcc" ) + time sudo apt-get install -y gcc g++ + echo "CCOMPILERC=\"gcc\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"g++\"" >> ./conf/config.sh + ;; + + "gcc8" ) + time sudo apt-get install -y gcc-8 g++-8 + echo "CCOMPILERC=\"gcc-8\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"g++-8\"" >> ./conf/config.sh + ;; + + "gcc10" ) + time sudo apt-get install -y gcc-10 g++-10 + echo "CCOMPILERC=\"gcc-10\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"g++-10\"" >> ./conf/config.sh + ;; + + # this is in order to use the "default" clang version of the OS, without forcing a specific version + "clang" ) + time sudo apt-get install -y clang + echo "CCOMPILERC=\"clang\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++\"" >> ./conf/config.sh + ;; + + "clang10" ) + time sudo apt-get install -y clang-10 + echo "CCOMPILERC=\"clang-10\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-10\"" >> ./conf/config.sh + ;; + + "clang11" ) + time sudo apt-get install -y clang-11 + echo "CCOMPILERC=\"clang-11\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-11\"" >> ./conf/config.sh + ;; + + "clang12" ) + time sudo apt-get install -y clang-12 + echo "CCOMPILERC=\"clang-12\"" >> ./conf/config.sh + echo "CCOMPILERCXX=\"clang++-12\"" >> ./conf/config.sh + ;; + + * ) + echo "Unknown compiler $COMPILER" + exit 1 + ;; +esac |