Edit travis file

This commit is contained in:
Daniel Chappuis 2018-04-06 07:17:48 +02:00
parent 29d5ff2c8e
commit c9924c406e
2 changed files with 93 additions and 44 deletions

View File

@ -1,7 +1,7 @@
language: cpp
matrix:
# Linux / GCC
# ----- Linux / GCC -----
include:
- os: linux
addons:
@ -12,21 +12,56 @@ matrix:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="False"
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="False"
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="True"
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="True"
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="False" RUN_CODE_COVERAGE="True"
# OS X / GCC
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="False"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="True"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="True"
# ----- OS X / GCC -----
- os: osx
osx_image: xcode8
env:
- MATRIX_EVAL="brew update && brew install gcc && CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="False"
- os: osx
osx_image: xcode8
env:
- MATRIX_EVAL="brew update && brew install gcc && CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="False"
- os: osx
osx_image: xcode8
env:
- MATRIX_EVAL="brew update && brew install gcc && CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Debug" DOUBLE_PRECISION="True"
- os: osx
osx_image: xcode8
env:
- MATRIX_EVAL="brew update && brew install gcc && CC=gcc-7 && CXX=g++-7" BUILD_TYPE="Release" DOUBLE_PRECISION="True"
# Linux / Clang
# ----- Linux / Clang -----
- os: linux
addons:
apt:
@ -38,23 +73,72 @@ matrix:
- g++-7
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" BUILD_TYPE="Debug" DOUBLE_PRECISION="False"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
- g++-7
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" BUILD_TYPE="Release" DOUBLE_PRECISION="False"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
- g++-7
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" BUILD_TYPE="Debug" DOUBLE_PRECISION="True"
- os: linux
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
- g++-7
env:
- MATRIX_EVAL="CC=clang-3.8 && CXX=clang++-3.8" BUILD_TYPE="Release" DOUBLE_PRECISION="True"
# OS X / Clang
# ----- OS X / Clang -----
- os: osx
osx_image: xcode8
env:
- BUILD_TYPE="Debug" DOUBLE_PRECISION="False"
- os: osx
osx_image: xcode8
env:
- BUILD_TYPE="Release" DOUBLE_PRECISION="False"
- os: osx
osx_image: xcode8
env:
- BUILD_TYPE="Debug" DOUBLE_PRECISION="True"
- os: osx
osx_image: xcode8
env:
- BUILD_TYPE="Release" DOUBLE_PRECISION="True"
before_install:
- eval "${MATRIX_EVAL}"
branches:
only:
- master
- develop
script: ./travis_build.sh
script:
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} —DDOUBLE_PRECISION_ENABLED=${DOUBLE_PRECISION} -DCOMPILE_TESTS=True ../
- make && make test ARGS="-V"

View File

@ -1,35 +0,0 @@
#! /bin/bash
# Bash script to build and test the project on Travis CI
# Build in debug mode with double precision and run the tests
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} —DDOUBLE_PRECISION_ENABLED=${DOUBLE_PRECISION} -DCOMPILE_TESTS=True ../
make && make test ARGS="-V"
# Build in debug mode with single precision and run the tests
#cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug —DDOUBLE_PRECISION_ENABLED=False -DCOMPILE_TESTS=True ../
#make && make test ARGS="-V"
# Build in release mode with double precision and run the tests
#cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release —DDOUBLE_PRECISION_ENABLED=True -DCOMPILE_TESTS=True ../
#make && make test ARGS="-V"
# Build in release mode with single precision and run the tests
#cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release —DDOUBLE_PRECISION_ENABLED=False -DCOMPILE_TESTS=True ../
#make && make test ARGS="-V"
# Build in release mode with logs and profiler enabled
#cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release —DPROFILING_ENABLED=True -DLOGS_ENABLED=True ../
#make
# Build in debug mode with logs, profiler and code coverage enabled
#cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug —DPROFILING_ENABLED=True -DLOGS_ENABLED=True ../
#make
# Run the code coverage with (lcov) only on a single build (when compiler is GCC and OS is Linux)
if [[ "$RUN_CODE_COVERAGE" == "True" ]]; then
# Build in debug mode with code coverage enabled
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCODE_COVERAGE_ENABLED=True ../
make && make test ARGS="-V"
fi