1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-15 13:19:56 +00:00
openmw-tes3mp/CI/before_script.linux.sh

72 lines
1.8 KiB
Bash
Raw Normal View History

#!/bin/bash
set -xeo pipefail
2016-01-21 08:22:42 +00:00
free -m
2018-07-08 17:26:57 +00:00
2021-05-09 22:16:24 +00:00
BUILD_UNITTESTS=OFF
BUILD_BENCHMARKS=OFF
2020-10-02 20:46:23 +00:00
if [[ "${BUILD_TESTS_ONLY}" ]]; then
export GOOGLETEST_DIR="${PWD}/googletest/build/install"
2020-10-02 20:46:23 +00:00
env GENERATOR='Unix Makefiles' CONFIGURATION=Release CI/build_googletest.sh
2021-05-09 22:16:24 +00:00
BUILD_UNITTESTS=ON
BUILD_BENCHMARKS=ON
2020-10-02 20:46:23 +00:00
fi
2018-07-08 17:26:57 +00:00
declare -a CMAKE_CONF_OPTS=(
-DCMAKE_C_COMPILER="${CC:-/usr/bin/cc}"
-DCMAKE_CXX_COMPILER="${CXX:-/usr/bin/c++}"
-DCMAKE_C_COMPILER_LAUNCHER=ccache
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
-DCMAKE_INSTALL_PREFIX=install
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DBUILD_SHARED_LIBS=OFF
-DUSE_SYSTEM_TINYXML=ON
-DCMAKE_INSTALL_PREFIX=install
-DRakNet_LIBRARY_RELEASE=~/CrabNet/lib/libRakNetLibStatic.a
-DRakNet_LIBRARY_DEBUG=~/CrabNet/lib/libRakNetLibStatic.a
)
if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
CMAKE_CONF_OPTS+=(
-DOPENMW_USE_SYSTEM_MYGUI=OFF
-DOPENMW_USE_SYSTEM_OSG=OFF
-DOPENMW_USE_SYSTEM_BULLET=OFF
)
2020-10-02 20:46:23 +00:00
fi
2018-07-08 17:26:57 +00:00
mkdir -p build
cd build
# Set up compilers
if [ ! -z "${MATRIX_CC}" ]; then
eval "${MATRIX_CC}"
fi
2019-02-13 16:45:05 +00:00
export RAKNET_ROOT=~/CrabNet
2020-10-02 20:46:23 +00:00
if [[ "${BUILD_TESTS_ONLY}" ]]; then
${ANALYZE} cmake \
"${CMAKE_CONF_OPTS[@]}" \
-DBUILD_OPENMW=OFF \
-DBUILD_OPENMW_MP=OFF \
-DBUILD_BSATOOL=OFF \
-DBUILD_ESMTOOL=OFF \
-DBUILD_LAUNCHER=OFF \
-DBUILD_BROWSER=OFF \
-DBUILD_MWINIIMPORTER=OFF \
-DBUILD_ESSIMPORTER=OFF \
-DBUILD_OPENCS=OFF \
-DBUILD_WIZARD=OFF \
2021-05-09 22:16:24 +00:00
-DBUILD_UNITTESTS=${BUILD_UNITTESTS} \
-DBUILD_BENCHMARKS=${BUILD_BENCHMARKS} \
-DGTEST_ROOT="${GOOGLETEST_DIR}" \
-DGMOCK_ROOT="${GOOGLETEST_DIR}" \
2020-10-02 20:46:23 +00:00
..
else
${ANALYZE} cmake \
"${CMAKE_CONF_OPTS[@]}" \
2020-10-02 20:46:23 +00:00
..
fi