forked from millerjv/PkModeling
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
90 lines (67 loc) · 1.88 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#branches:
# only:
# - continuous-integration
language: c++
#os:
#- osx
#- linux
matrix:
include:
- os: linux
dist: trusty
sudo: required
compiler: gcc
- os: osx
compiler: clang
#env:
# global:
# - CTEST_MODEL=Experimental
#compiler:
#- clang
#- gcc
cache:
directories:
- $HOME/downloads
before_script:
# Use scikit-ci-addons to
# * streamline installation of CMake
# * install package required to automatically create or update GitHub releases
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo -H pip install -U --upgrade-strategy "only-if-needed" "scikit-ci-addons>=0.18.0" ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then pip2 install -U "scikit-ci-addons>=0.18.0" ; fi
- ci_addons travis/install_cmake 3.10.2
# Install Ninja
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget --no-check-certificate https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-linux.zip ; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then unzip ninja-linux.zip ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget --no-check-certificate https://github.com/ninja-build/ninja/releases/download/v1.7.2/ninja-mac.zip ; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then unzip ninja-mac.zip ; fi
- mkdir -p $HOME/bin/
- cp ninja $HOME/bin/
- export PATH="$HOME/bin/:$PATH"
# Check Ninja
- cd $HOME/bin/
- pwd
- ls -l -F
# check cmake version
- cmake --version
# Prepare and goto build directory
- mkdir -p $TRAVIS_BUILD_DIR/pkmodeling-build
- cd $TRAVIS_BUILD_DIR/pkmodeling-build
script:
# Use Ninja for building
- cmake -G Ninja $TRAVIS_BUILD_DIR
- ninja
# ALTERNATIVE: use make for building
#- cmake $TRAVIS_BUILD_DIR
#- make
# Check build output dir
- cd $TRAVIS_BUILD_DIR/pkmodeling-build/pkmodeling-build
- pwd
- ls -l -F
# TEST
- ctest .
# PACKAGE
- ninja package
notifications:
email:
on_success: change # default: change
on_failure: always # default: always