1sudo: required
2dist: trusty
3cache:
4  apt: true
5
6language: cpp
7
8os:
9  - linux
10  - osx
11
12compiler:
13  - gcc
14  - clang
15
16env:
17  - BUILD_TYPE=Debug   COVERALLS=ON
18  - BUILD_TYPE=Release COVERALLS=OFF
19
20matrix:
21  exclude:
22    - os: osx
23      compiler: gcc
24
25addons:
26  apt:
27    packages:
28      - libboost-all-dev
29
30install:
31  # Install dependencies for FCL
32  - if [ "$TRAVIS_OS_NAME" = "linux" ]; then 'ci/install_linux.sh' ; fi
33  - if [ "$TRAVIS_OS_NAME" = "osx"   ]; then 'ci/install_osx.sh'   ; fi
34
35script:
36  # Create build directory
37  - mkdir build
38  - cd build
39
40  # Configure
41  - cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DFCL_COVERALLS=$COVERALLS ..
42
43  # Build
44  - make -j4
45  - if [ $COVERALLS = ON ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then make coveralls; fi
46
47  # Run unit tests
48  - make test
49
50  # Make sure we can install and uninstall with no issues
51  - sudo make -j4 install
52  - sudo make -j4 uninstall
53
54