EventBus/.travis.yml
Dawid Drozd f7dd4172cf Improve Travis script
Fixed after reordering project structure
2018-07-31 10:26:27 +02:00

55 lines
1.8 KiB
YAML

language: cpp
sudo: false
common_sources: &all_sources
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-3.9
- llvm-toolchain-trusty-4.0
- llvm-toolchain-trusty-5.0
- llvm-toolchain-trusty-6.0
matrix:
exclude: # On OSX g++ is a symlink to clang++ by default
- os: osx
compiler: gcc
include:
- os: linux
compiler: gcc
addons:
apt:
sources: *all_sources
packages: ['gcc-7', 'g++-7', 'cmake']
env: COMPILER='g++-7'
- os: linux
compiler: clang
addons:
apt:
sources: *all_sources
packages: ['clang-6.0', 'libstdc++-6-dev', 'cmake']
env: COMPILER='clang++-6.0'
- os: osx
osx_image: xcode9.4
compiler: clang
env: COMPILER='clang++'
before_install:
# Install catch 2 dependency
- wget https://github.com/catchorg/Catch2/archive/v2.2.3.zip
- unzip v2.2.3.zip && cd Catch2-2.2.3 && mkdir -p build/ && cd build/
- cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_INSTALL_PREFIX=~/.local/ && cmake --build . --target install
- cd ../..
script:
#Build & Install library
- (mkdir -p lib/build-debug/ && cd lib/build-debug && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/.local/ .. && cmake --build . --target install)
- (mkdir -p lib/build-release/ && cd lib/build-release && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local/ .. && cmake --build . --target install)
# Run tests
- (mkdir -p test/build-debug/ && cd test/build-debug && cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=~/.local/ .. && cmake --build . && ctest -V .)
- (mkdir -p test/build-release/ && cd test/build-release && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=~/.local/ .. && cmake --build . && ctest -V .)