Files
azerothcore-wotlk/apps/ci/ci-install.sh
Stoabrogga e1c3433afc feat(CI): improve Travis configuration (#1486)
- use random DB names in order to detect statements which address a specific DB
- split compilation and DB check (DB check and dry run only have to run once)
- use separate shell scripts for easier module Travis integration
2019-02-19 16:21:52 +01:00

43 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
echo "install OS deps (apt-get)"
bash ./acore.sh "install-deps"
if [ "$TRAVIS_BUILD_ID" = "1" ]
then
echo "install clang-3.8"
sudo apt-get install clang-3.8
elif [ "$TRAVIS_BUILD_ID" = "2" ]
then
echo "install clang-7"
sudo apt-get install clang-7
fi
echo "create config.sh"
cat >>conf/config.sh <<CONFIG_SH
CCOMPILERC=$CCOMPILERC
CCOMPILERCXX=$CCOMPILERCXX
MTHREADS=4
CWARNINGS=ON
CDEBUG=OFF
CTYPE=Release
CSCRIPTS=ON
CSERVERS=ON
CTOOLS=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='$DB_RND_NAME'; MYSQL_HOST='localhost';"
DB_AUTH_CONF="MYSQL_USER='root'; MYSQL_PASS='$DB_RND_NAME'; MYSQL_HOST='localhost';"
DB_WORLD_CONF="MYSQL_USER='root'; MYSQL_PASS='$DB_RND_NAME'; MYSQL_HOST='localhost';"
DB_AUTH_NAME=auth_$DB_RND_NAME
DB_CHARACTERS_NAME=characters_$DB_RND_NAME
DB_WORLD_NAME=world_$DB_RND_NAME
CONFIG_SH
if [ "$TRAVIS_BUILD_ID" = "1" ]
then
echo "import DB"
bash ./acore.sh "db-assembler" "import-all"
fi