gtsam/.travis.yml

103 lines
2.6 KiB
YAML

language: cpp
cache: ccache
sudo: required
dist: xenial
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-8
- clang-3.8
- build-essential
- pkg-config
- cmake
- libpython-dev python-numpy
- libboost-all-dev
# before_install:
# - if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update ; fi
install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
script:
- bash .travis.sh
# We first do the compile stage specified below, then the matrix expansion specified after.
stages:
- compile
- test
# Compile stage without building examples/tests to populate the caches.
jobs:
include:
# on Mac, GCC
- stage: compile
os: osx
compiler: gcc
env: CMAKE_BUILD_TYPE=Debug GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
- stage: compile
os: osx
compiler: gcc
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
# on Mac, CLANG
- stage: compile
os: osx
compiler: clang
env: CMAKE_BUILD_TYPE=Debug GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
- stage: compile
os: osx
compiler: clang
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
# on Linux, GCC
- stage: compile
os: linux
compiler: gcc
env: CMAKE_BUILD_TYPE=Debug GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
- stage: compile
os: linux
compiler: gcc
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
# on Linux, CLANG
- stage: compile
os: linux
compiler: clang
env: CMAKE_BUILD_TYPE=Debug GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
- stage: compile
os: linux
compiler: clang
env: CMAKE_BUILD_TYPE=Release GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
# on Linux, with deprecated ON to make sure that path still compiles
- stage: compile
os: linux
compiler: clang
env: GTSAM_ALLOW_DEPRECATED_SINCE_V4=ON GTSAM_BUILD_TESTS=OFF GTSAM_BUILD_EXAMPLES_ALWAYS=ON
# Matrix configuration:
os:
- osx
- linux
compiler:
- gcc
- clang
env:
global:
- MAKEFLAGS="-j2"
- CCACHE_SLOPPINESS=pch_defines,time_macros
- GTSAM_BUILD_UNSTABLE=ON
- GTSAM_ALLOW_DEPRECATED_SINCE_V4=OFF
- GTSAM_BUILD_EXAMPLES_ALWAYS=OFF
- GTSAM_BUILD_TESTS=ON
matrix:
- CMAKE_BUILD_TYPE=Debug
- CMAKE_BUILD_TYPE=Release
# Uncomment this if you want to exclude clang on linux
# matrix:
# exclude:
# - os: linux
# compiler: clang