mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-27 12:21:02 +08:00
55 lines
1.8 KiB
YAML
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.6.0.zip
|
|
- unzip v2.6.0.zip && cd Catch2-2.6.0 && 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 .)
|
|
|