-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
162 lines (155 loc) · 8.13 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
language: cpp
compiler: gcc
dist: trusty
before_install:
- echo $TRAVIS_BRANCH
# C++14
- sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
# R
- sudo add-apt-repository -y ppa:marutter/rrutter
- sudo apt-get update -qq
install:
# R (including package prerequisites), do this before C++
- sudo apt-get install gfortran libssh2-1-dev
- if [[ $TRAVIS_BRANCH == "daic" || $TRAVIS_BRANCH == "elly" || $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then sudo apt-get install r-base r-base-dev; fi
- if [[ $TRAVIS_BRANCH == "daic" || $TRAVIS_BRANCH == "elly" || $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then sudo Rscript -e 'source("install_r_packages.R")'; fi
# C++14, do this after R
- sudo apt-get install -qq g++-5
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
# Qt5
- sudo apt-get install -qq libqt5webkit5-dev qtdeclarative5-dev
- export QMAKE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
# gcov
- sudo update-alternatives --install /usr/bin/gcov gcov /usr/bin/gcov-5 90
# cppcheck
- sudo apt-get install -qq cppcheck
# Codecov
- sudo pip install codecov
# GSL
- my_github=${PWD##*/}
- cd ..
- git clone https://github.com/Microsoft/GSL
- cd $my_github
# OCLint
- ./install_oclint
# GraphViz
- sudo apt-get install -qq graphviz
# Boost
addons:
apt:
packages: libboost-all-dev
# Start virtual X server, from https://docs.travis-ci.com/user/gui-and-headless-browsers/
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- ./download_other_githubs
###############################################
# Build and run the tests
###############################################
# jobo_test
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then qmake jobo_test.pro; make debug; ./jobo_test; fi
# kewe_test
- if [[ $TRAVIS_BRANCH == "kewe" || $TRAVIS_BRANCH == "master" ]]; then qmake kewe_test.pro; make debug; ./kewe_test; fi
# ribi
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then qmake ribi_test.pro; fi
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then time make debug; fi
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then time ./ribi_test; fi
# pbd
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then qmake pbd_test.pro; make debug; ./pbd_test; fi
# sado
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then qmake sado_test.pro; fi
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then time make debug; fi
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then time ./sado_test; fi
###############################################
# Build and run (when possible) the command line applications
###############################################
# jobo
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then qmake jobo.pro; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then make debug; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo --help; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo --version; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo --create; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo jobo.txt; fi
- if [[ $TRAVIS_BRANCH == "jobo" || $TRAVIS_BRANCH == "master" ]]; then ./jobo 30 42 0.1 20 10 ltt_v.csv ltt_i.csv nltt_v.csv nltt_i.csv; fi
# kewe
- if [[ $TRAVIS_BRANCH == "kewe" || $TRAVIS_BRANCH == "master" ]]; then qmake kewe.pro; make debug; fi
# ribi
# Nope, do this at profiling
# pbd
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then qmake pbd.pro; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then make debug; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd --help; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd --version; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then rm pbd.txt; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd --create; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd pbd.txt; fi
- if [[ $TRAVIS_BRANCH == "pbd" || $TRAVIS_BRANCH == "master" ]]; then ./pbd 0.5 0.4 0.3 0.2 0.1 2.3 42 pbd.csv; fi
# sado
# Nope, do this at profiling
###############################################
# Build (not run) the GUIs
###############################################
# sado, first because it has a sim that runs for five minutes
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then qmake -qt=qt5 sado_gui.pro; fi
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then time make debug; fi
- if [[ $TRAVIS_BRANCH == "sado" || $TRAVIS_BRANCH == "master" ]]; then (./sado_gui --run &) ; fi
- if [[ $TRAVIS_BRANCH == "sado" ]]; then sleep 300; fi
# ribi
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then qmake -qt=qt5 ribi_gui.pro; fi
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then time make debug; fi
# pbd
- if [[ $TRAVIS_BRANCH == "ribi" || $TRAVIS_BRANCH == "master" ]]; then qmake -qt=qt5 pbd_gui.pro; make debug; fi
###############################################
# Profiling, requires a rebuild in release mode
###############################################
# jaan
- if [[ $TRAVIS_BRANCH == "jaan" ]]; then qmake jaan_EDSS.pro; fi
- if [[ $TRAVIS_BRANCH == "jaan" ]]; then make release; fi
- if [[ $TRAVIS_BRANCH == "jaan" ]]; then time ./jaan_EDSS; fi
- if [[ $TRAVIS_BRANCH == "jaan" ]]; then gprof jaan_EDSS > gprof.log; fi
- if [[ $TRAVIS_BRANCH == "jaan" ]]; then head gprof.log; fi
# jobo
- if [[ $TRAVIS_BRANCH == "jobo" ]]; then qmake jobo.pro; fi
- if [[ $TRAVIS_BRANCH == "jobo" ]]; then make release; fi
- if [[ $TRAVIS_BRANCH == "jobo" ]]; then time ./jobo --profile; fi
- if [[ $TRAVIS_BRANCH == "jobo" ]]; then gprof jobo > gprof.log; fi
- if [[ $TRAVIS_BRANCH == "jobo" ]]; then head gprof.log; fi
# kewe
- if [[ $TRAVIS_BRANCH == "kewe" ]]; then qmake kewe.pro; fi
- if [[ $TRAVIS_BRANCH == "kewe" ]]; then make release; fi
- if [[ $TRAVIS_BRANCH == "kewe" ]]; then time ./kewe --profile; fi
- if [[ $TRAVIS_BRANCH == "kewe" ]]; then gprof kewe > gprof.log; fi
- if [[ $TRAVIS_BRANCH == "kewe" ]]; then head gprof.log; fi
# ribi
- if [[ $TRAVIS_BRANCH == "ribi" ]]; then qmake ribi.pro; fi
- if [[ $TRAVIS_BRANCH == "ribi" ]]; then time make release; fi
- if [[ $TRAVIS_BRANCH == "ribi" ]]; then time ./ribi --profile; fi
- if [[ $TRAVIS_BRANCH == "ribi" ]]; then gprof ribi > gprof.log; fi
- if [[ $TRAVIS_BRANCH == "ribi" ]]; then head gprof.log; fi
# sado
- if [[ $TRAVIS_BRANCH == "sado" ]]; then qmake sado.pro; fi
- if [[ $TRAVIS_BRANCH == "sado" ]]; then time make release; fi
- if [[ $TRAVIS_BRANCH == "sado" ]]; then time ./sado --profile; fi
- if [[ $TRAVIS_BRANCH == "sado" ]]; then gprof sado > gprof.log; fi
- if [[ $TRAVIS_BRANCH == "sado" ]]; then head gprof.log; fi
###############################################
# cppcheck
###############################################
# cppcheck
- cppcheck --quiet --error-exitcode=1 .
###############################################
# Code coverage
###############################################
- ./get_code_cov >/dev/null
- codecov >/dev/null
###############################################
# OCLint
###############################################
- ./do_oclint
after_success:
- bash <(curl -s https://codecov.io/bash)