Reworking Travis script.
This commit is contained in:
parent
63f5eba41b
commit
f4d103ea36
99
.travis.yml
99
.travis.yml
|
|
@ -1,63 +1,60 @@
|
||||||
# Kudos to these guys:
|
# Kudos to these guys:
|
||||||
# http://genbattle.bitbucket.org/blog/2016/01/17/c++-travis-ci/
|
# http://genbattle.bitbucket.org/blog/2016/01/17/c++-travis-ci/
|
||||||
# https://github.com/ticapix/arduino-toolbox/blob/master/.travis.yml
|
# https://github.com/ticapix/arduino-toolbox/blob/master/.travis.yml
|
||||||
|
# https://github.com/Return-To-The-Roots/s25client/blob/master/.travis.yml
|
||||||
|
|
||||||
# Ubuntu 14.04 Trusty support
|
sudo: false
|
||||||
sudo: required
|
|
||||||
dist: trusty
|
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
matrix:
|
os:
|
||||||
include:
|
- linux
|
||||||
- compiler: gcc
|
|
||||||
addons:
|
compiler:
|
||||||
apt:
|
- clang
|
||||||
sources:
|
- g++
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
packages:
|
env:
|
||||||
- g++-4.9
|
- BUILD_TYPE=Debug
|
||||||
env: COMPILER=g++-4.9
|
|
||||||
- compiler: gcc
|
addons:
|
||||||
addons:
|
apt:
|
||||||
apt:
|
sources:
|
||||||
sources:
|
- ubuntu-toolchain-r-test
|
||||||
- ubuntu-toolchain-r-test
|
- llvm-toolchain-precise-3.5
|
||||||
packages:
|
packages:
|
||||||
- g++-5
|
- g++-4.8
|
||||||
env: COMPILER=g++-5
|
- clang-3.5
|
||||||
- compiler: clang
|
- llvm-3.5
|
||||||
addons:
|
- cmake
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-precise-3.6
|
|
||||||
packages:
|
|
||||||
- clang-3.6
|
|
||||||
env: COMPILER=clang++-3.6
|
|
||||||
- compiler: clang
|
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
sources:
|
|
||||||
- ubuntu-toolchain-r-test
|
|
||||||
- llvm-toolchain-precise-3.7
|
|
||||||
packages:
|
|
||||||
- clang-3.7
|
|
||||||
env: COMPILER=clang++-3.7
|
|
||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
# - source <(curl -SLs https://raw.githubusercontent.com/fortyseveneffects/travis-ci-arduino/master/install.sh)
|
# - source <(curl -SLs https://raw.githubusercontent.com/fortyseveneffects/travis-ci-arduino/master/install.sh)
|
||||||
|
|
||||||
install:
|
install:
|
||||||
# Install lcov from source
|
# Enable coverage analysis only for clang
|
||||||
# - wget http://ftp.fr.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz
|
- |
|
||||||
# - tar xf lcov_1.12.orig.tar.gz
|
if [ "$CXX" = "g++" ]; then
|
||||||
# - sudo make -C lcov-1.12/ install
|
# GCov 4.6 cannot handle the file structure
|
||||||
# - sudo apt-get install ggcov
|
export CXX="g++-4.8"
|
||||||
- gem install coveralls-lcov
|
export GCOV="gcov-4.8"
|
||||||
- lcov --version
|
|
||||||
- gcov --version
|
# Install newer lcov (1.9 seems to fail: http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
|
||||||
|
export LCOV_ROOT="$HOME/lcov"
|
||||||
|
mkdir -p "$LCOV_ROOT"
|
||||||
|
wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.12.orig.tar.gz --output-document="$LCOV_ROOT/lcov.tar.gz"
|
||||||
|
tar xf "$LCOV_ROOT/lcov.tar.gz" --strip-components=1 -C $LCOV_ROOT
|
||||||
|
export PATH="$LCOV_ROOT/bin:$PATH"
|
||||||
|
which lcov
|
||||||
|
|
||||||
|
# Install coveralls tool
|
||||||
|
gem install coveralls-lcov
|
||||||
|
|
||||||
|
else
|
||||||
|
export GCOV="gcov" # Just to have anything valid
|
||||||
|
fi
|
||||||
|
# Use clang 3.5
|
||||||
|
- if [ "$CXX" = "clang++" ]; then export CXX="clang++-3.5"; export CC="clang-3.5"; fi
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# Build examples with Arduino IDE on each available platform / board
|
# Build examples with Arduino IDE on each available platform / board
|
||||||
|
|
@ -65,14 +62,14 @@ script:
|
||||||
|
|
||||||
# Build and run unit tests with regular C++ compiler
|
# Build and run unit tests with regular C++ compiler
|
||||||
- mkdir build && cd build
|
- mkdir build && cd build
|
||||||
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=Debug ..
|
- cmake -DCMAKE_CXX_COMPILER=$COMPILER -DCMAKE_BUILD_TYPE=${BUILD_TYPE} --generator="Unix Makefiles" ..
|
||||||
- make all
|
- make all
|
||||||
- ctest --verbose
|
- ctest --verbose
|
||||||
|
|
||||||
after_success:
|
after_success:
|
||||||
# Generate code coverage information & send to Coveralls
|
# Generate code coverage information & send to Coveralls
|
||||||
- lcov --directory . --capture --output-file coverage.info
|
- lcov --gcov-tool $GCOV --directory . --capture --output-file coverage.info
|
||||||
- lcov --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
|
- lcov --gcov-tool $GCOV --remove coverage.info 'test/*' '/usr/*' 'external/*' --output-file coverage.info
|
||||||
- lcov --list coverage.info
|
- lcov --list coverage.info
|
||||||
- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
|
- coveralls-lcov --repo-token ${COVERALLS_TOKEN} coverage.info
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue