sudo: required dist: xenial # (16.04) # bionic (18.04) is not yet available in travis language: cpp compiler: - clang addons: apt: update: true services: - mysql git: depth: 1 before_install: - git config user.email "travis@build.bot" && git config user.name "Travis CI" - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd bin/; fi # import pending sql - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash acore-db-pendings; fi - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then cd ..; fi # push changes to git if any - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git fetch --unshallow; fi - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git checkout $TRAVIS_BRANCH; fi - if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git add -A . && git diff --cached --quiet || git commit -am "Importing pending sql" && git push https://$GITHUB_API_KEY@github.com/$TRAVIS_REPO_SLUG.git $TRAVIS_BRANCH; fi install: # install OS deps (apt-get) - bash ./acore.sh "install-deps" # create config file - echo "CCUSTOMOPTIONS='-DWITH_WARNINGS=1 -DWITH_COREDEBUG=1 -DUSE_COREPCH=0 -DUSE_SCRIPTPCH=0 -DTOOLS=1 -DSCRIPTS=1 -DSERVERS=1 -DWITH_PERFTOOLS=1 -DENABLE_EXTRA_LOGS=1 -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=\"-Werror\" -DCMAKE_CXX_FLAGS=\"-Werror\"';" >> conf/config.sh - echo "DB_CHARACTERS_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh - echo "DB_AUTH_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh - echo "DB_WORLD_CONF=\"MYSQL_USER='root'; MYSQL_PASS=''; MYSQL_HOST='127.0.0.1';\"" >> conf/config.sh # create and import mysql - mysql -e "SET GLOBAL sql_mode = '';" # this is necessary because of mysql 5.7 - bash ./acore.sh "db-assembler" "import-all" script: # compile - bash ./acore.sh "compiler" "all"