Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (41 sloc) 1.81 KB
language: cpp
sudo: required
dist: bionic
cache: ccache
#compiler:
# - gcc
# - clang
matrix:
include:
- os: linux
env:
- MATRIX_ENV="PASS=build CXX='g++-9' CC='gcc-9' BUILD_TYPE=Quick"
- os: linux
env:
- MATRIX_ENV="PASS=build CXX='clang++-8' CC='clang-8' BUILD_TYPE=sanitize"
- os: linux
env:
- MATRIX_ENV="PASS=lint CLANG_FORMAT=clang-format-8"
# Passes todo:
# - osx
# - linux sanitize
# - linux static analysis (clang-tidy?)
before_install:
- sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
- sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main' -y
- sudo apt-get update -q
- sudo apt-get install g++-9 clang-8 clang-format-8 clang-tidy-8 ninja-build -y
- eval "${MATRIX_ENV}"
- env
- ./tools/travis-scripts/build_prepare_linux.sh
- ${CXX} --version
- ${CC} --version
before_script:
- export CFLAGS="-Wall -Wextra" CXXFLAGS="-Wall -Wextra"
- $(which time) cmake . -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCLANG_TIDY=clang-tidy-8 -DCLANG_FORMAT=clang-format-8 -DENABLE_TESTS=ON -DCMAKE_C_FLAGS="${CFLAGS}" -DCMAKE_CXX_FLAGS="${CXXFLAGS}" -GNinja
script:
# Create the GameState as that triggers the generated source commands
- if [ "$PASS" = "build" ]; then echo "Building revision $(git describe --tags --all --long --always)"; $(which time) ninja && `which time` ctest -V -j 2; fi
- if [ "$PASS" = "lint" ]; then echo "clang-format linting range ${TRAVIS_COMMIT_RANGE}"; CLANG_FORMAT=${CLANG_FORMAT} ./tools/lint.sh ${TRAVIS_COMMIT_RANGE}; fi
- if [ "$PASS" = "lint" ]; then ninja generated-source && echo "clang-tidy linting range ${TRAVIS_COMMIT_RANGE}"; CLANG_TIDY=clang-tidy BUILD_DIR=$(pwd) ./tools/lint-tidy.sh ${TRAVIS_COMMIT_RANGE}; fi
You can’t perform that action at this time.