-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
84 lines (73 loc) · 2.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
82
83
84
language: c
# Container is faster to spin than the VM
sudo: false
# Need 14.04 for a recent enough CMake
# Not bad to have more recent clang and gcc
dist: trusty
addons:
apt:
# Need to fetch from the source. Here is the motherload:
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
sources:
- llvm-toolchain-trusty-5.0
- ubuntu-toolchain-r-test
packages:
- xorg-dev # needed by GLFW
- valgrind
- clang-5.0 # bleeding edge
- gcc-7
matrix:
include:
# Recent GCC
- compiler: gcc-7
env:
- FLAGS="-Werror"
# Latest clang build
- compiler: clang-5.0
env:
- FLAGS="-Werror"
# Undefined behavior sanitizer
- compiler: clang-5.0
env:
- FLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined -g -DTRAVIS"
- RUN=debug
# Address sanitizer
- compiler: clang-5.0
env:
- FLAGS="-fsanitize=address -O1 -fno-omit-frame-pointer -g -DTRAVIS"
- RUN=debug
- LSAN_OPTIONS="suppressions=lsan.supp"
- ASAN_OPTIONS="fast_unwind_on_malloc=0"
# Valgrind
- compiler: clang-5.0
env:
- RUN=valgrind
- FLAGS="-O1 -fno-omit-frame-pointer -g -DTRAVIS"
# Valgrind can be killed by Travis because it consumes more than 3Gb of RAM
# see https://docs.travis-ci.com/user/common-build-problems/#My-build-script-is-killed-without-any-error
fast_finish: true
allow_failures:
- compiler: clang-5.0
env:
- RUN=valgrind
- FLAGS="-O1 -fno-omit-frame-pointer -g -DTRAVIS"
# Build and install deps/ locally
install: ./install-deps.sh
# Run a virtual frame buffer (xvfb) rather than disabling the window
# see https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # give xvfb some time to start
script:
- make -j2 CC=$CC USER_FLAGS="$FLAGS" BUILD_DIR=build/debug
- |
case $RUN in
debug)
./run.sh debug roms/daytrip.bin
;;
valgrind)
./run.sh -r 'valgrind --leak-check=full --error-exitcode=1 --suppressions=valgrind.supp'\
debug roms/daytrip.bin
;;
esac