-
Notifications
You must be signed in to change notification settings - Fork 33
/
.travis.yml
82 lines (72 loc) · 3.16 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
# the Qt stuff is adapted from https://github.com/VioletGiraffe/file-commander/blob/master/.travis.yml
# there seems to be no simple solution to building Qt5 apps on travis; you have to install all this stuff
language: cpp
matrix:
include:
- os: osx
osx_image: xcode9.4
compiler: clang
- os: linux
dist: xenial
compiler: gcc
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
# C++17
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:ubuntu-toolchain-r/test; fi
install:
# C++17
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository -y ppa:beineri/opt-qt-5.12.3-xenial; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get -qy update; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq g++-8 gcc-8; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 90; fi
# Qt5
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --force qt5; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export QMAKE=/usr/local/bin/qmake; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=/usr/local/opt/qt5/bin:$PATH; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq qt512-meta-minimal; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install -qq libx11-xcb-dev libglu1-mesa-dev; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export QMAKE=/opt/qt512/bin/qmake; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export PATH=/opt/qt512/bin/:$PATH; fi
# set up build directories for Release and Debug builds and run cmake in each; "make" should then work
# note that we start out in /home/travis/build/MesserLab/SLiM here, and end in /home/travis/build/MesserLab
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then gcc --version; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then g++ --version; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then clang --version; fi
- cd ..
- mkdir Release
- cd Release
- cmake -D BUILD_SLIMGUI=ON -D CMAKE_BUILD_TYPE=Release ../SLiM
- cd ..
- mkdir Debug
- cd Debug
- cmake -D BUILD_SLIMGUI=ON -D CMAKE_BUILD_TYPE=Debug ../SLiM
- cd ..
# build using make, then run Eidos and SLiM tests; do for each of Release and Debug
# builds can take more than 10 minutes so we use travis_wait
script:
- cd Release
- travis_wait make VERBOSE=1 -j 5 eidos
- travis_wait make VERBOSE=1 -j 5 slim
- travis_wait make VERBOSE=1 -j 5 SLiMgui
- ./eidos -testEidos
- ./slim -testEidos
- ./slim -testSLiM
- cd ../Debug
- travis_wait make VERBOSE=1 -j 5 eidos
- travis_wait make VERBOSE=1 -j 5 slim
- travis_wait make VERBOSE=1 -j 5 SLiMgui
- ./eidos -testEidos
- ./slim -testEidos
- ./slim -testSLiM
# test only the master branch for now; add other branches as needed
branches:
only:
- master
# notify me by email after all builds
notifications:
email:
on_success: always
on_failure: always