forked from cataclysmbnteam/Cataclysm-BN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
256 lines (221 loc) · 8.74 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# this file is HEAVILY influenced by https://github.com/boostorg/hana/blob/master/.travis.yml
dist: xenial
language: c++
cache: ccache
notifications:
email: false
git:
depth: 5
addons:
# these apt sources will be referenced later (by using *name)
apt:
sources: &apt_sources
- ubuntu-toolchain-r-test
config:
retries: true
compiler: gcc
os: linux
branches:
only:
- testing
- upload
# Overall strategy for what sorts of builds to include:
# We want a build for each compiler and each platform.
# For PRs, we lessen the "each compiler" requirement to just covering the newest
# and oldest relevant version of each compiler.
# We also want to ensure that each of the following tweaks are covered in at
# least one PR build:
# - TILES=1
# - SOUND=1
# - RELEASE=1
# - CMAKE=1
# - SANITIZE=address
# - LOCALIZE=0
# - A clang-tidy run (now switched to GitHub workflow)
# - Tests with important mods enabled (Magiclysm, RL_Classes)
# We try to minimize the number of builds subject to those constraints.
# To see what toolchains are available, consult the following:
# https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json
# https://launchpad.net/%7Eubuntu-toolchain-r/+archive/ubuntu/test/+index
jobs:
include:
# Initial test stage, if this fails everything else is canceled.
- stage: Test
# Clang is consistently the fastest to build, so use it for the initial test.
env: CLANG=clang++-3.8 MODS=--mods=RL_Classes TEST_STAGE=1 CXXFLAGS="-Wno-error=unused-command-line-argument -D__extern_always_inline='extern __always_inline'"
name: "Clang 3.8 Make build with curses, style check and RL_Classes test"
compiler: clang
addons: &clang38
apt:
packages: ["clang-3.8"]
sources: [*apt_sources]
- stage: "Deployable"
# MXE variant using alternate repository http://mirror.mxe.cc/repos/apt
env: COMPILER=g++ LDFLAGS="-static-libgcc -static-libstdc++" MXE_TARGET="i686-w64-mingw32.static" WINE="wine" RELEASE=1 TILES=1 SOUND=1 OPTLEVEL="-O3"
name: "Mingw-w64 Make cross-compile to Windows 32 bit, with -O3 optimization, with Tiles and Sound"
compiler: gcc
addons: &gcc
apt:
packages: ["wine"]
- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" RELEASE=1 TILES=1 SOUND=1
name: "GCC 8 32 bit Make build with Tiles and Sound"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: *apt_sources
- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" RELEASE=1
name: "GCC 8 32 bit Make build with Curses"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libc6-dbg:i386"]
sources: *apt_sources
# OSX
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 RELEASE=1 TILES=1 SOUND=1 BREWGETTEXT=1
name: "Xcode 10.1 Make build with Tiles and sound (macOS 32 bit)"
os: osx
osx_image: xcode10.1
compiler: clang
- env: CLANG=clang++ NATIVE=osx OSX_MIN=10.13 RELEASE=1 BREWGETTEXT=1
name: "Xcode 10.1 Make build with Curses (macOS 32 bit)"
os: osx
osx_image: xcode10.1
compiler: clang
# 64 bit builds
- env: COMPILER=g++ LDFLAGS="-static-libgcc -static-libstdc++" MXE_TARGET="x86_64-w64-mingw32.static" WINE="wine" RELEASE=1 TILES=1 SOUND=1 OPTLEVEL="-O3"
name: "Mingw-w64 Make cross-compile to Windows 64 bit, with -O3 optimization, with Tiles and Sound"
compiler: gcc
addons: &gcc
apt:
packages: ["wine"]
- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" RELEASE=1 TILES=1 SOUND=1 NATIVE=linux64
name: "GCC 8 64 bit Make build with Tiles and Sound"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg", "libsdl2-dev", "libsdl2-ttf-dev", "libsdl2-image-dev", "libsdl2-mixer-dev"]
sources: *apt_sources
- env: COMPILER=g++-8 CXXFLAGS="-Wno-implicit-fallthrough" RELEASE=1 NATIVE=linux64
name: "GCC 8 64 bit Make build with Curses"
dist: bionic
compiler: gcc
addons: &gcc8
apt:
packages: ["g++-8", "g++-8-multilib", "libc6-dbg"]
sources: *apt_sources
# Android
- env: NATIVE=android
name: "Android ARM 64"
language: android
dist: trusty
android:
components:
- build-tools-16
- android-16
- platform-tools
- env: NATIVE=android ANDROID32=1
name: "Android ARM 32"
language: android
dist: trusty
android:
components:
- build-tools-16
- android-16
- platform-tools
# Finally check the compiler variants
- stage: compilers
env: COMPILER=g++ MODS=--mods=magiclysm LOCALIZE=0
name: "GCC 5.3 Make build with curses, Magiclysm, and no Localization"
compiler: gcc
addons: &gcc53
apt:
packages: ["g++-5=5.3.1-14ubuntu2", "libstdc++-5-dev=5.3.1-14ubuntu2", "gcc-5=5.3.1-14ubuntu2", "gcc-5-base=5.3.1-14ubuntu2", "cpp-5=5.3.1-14ubuntu2", "libgcc-5-dev=5.3.1-14ubuntu2", "libasan2=5.3.1-14ubuntu2", "libmpx0=5.3.1-14ubuntu2"]
sources: [*apt_sources]
- env: CLANG=clang++-8 SANITIZE=address,undefined EXTRA_TEST_OPTS="~[.] ~vehicle_efficiency ~vehicle_drag ~starting_items ~[starve] ~grenade_lethality"
name: "Clang 8 Make build with sanitizers enabled, but long-running tests disabled"
compiler: clang
addons: &clang8
apt:
packages: ["clang-8"]
sources: [*apt_sources, llvm-toolchain-xenial-8]
- env: COMPILER=g++
name: "GCC 5.4 Make build with Curses"
if: type != pull_request
- env: COMPILER=g++-6 CODE_COVERAGE=true
name: "GCC 6 Make build with Curses and Code Coverage"
if: type != pull_request
compiler: gcc
addons: &gcc6
apt:
packages: ["g++-6", "g++-6-multilib", "libc6-dbg", "libc6-dbg:i386"]
sources: *apt_sources
- env: COMPILER=g++-7 CXXFLAGS='-Wno-implicit-fallthrough -D_GLIBCXX_DEBUG'
name: "GCC 7 Make build with Curses and GLIBCXX_DEBUG"
if: type != pull_request
compiler: gcc
addons: &gcc7
apt:
packages: ["g++-7", "g++-7-multilib", "libc6-dbg", "libc6-dbg:i386", "lcov"]
sources: *apt_sources
- env: COMPILER='g++' LDFLAGS='-static-libgcc -static-libstdc++' MXE_TARGET='i686-w64-mingw32.static' WINE='wine'
name: "Mingw-w64 Make build with Curses"
if: type != pull_request
addons: &gcc
apt:
packages: ["wine"]
- env: CLANG=clang++-3.9 CXXFLAGS='-Wno-error=unused-command-line-argument -D__extern_always_inline="extern __always_inline"'
name: "Clang 3.9 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang39
apt:
packages: ["clang-3.9"]
sources: *apt_sources
- env: CLANG=clang++-4.0 CXXFLAGS=-Wno-error=unused-command-line-argument
name: "Clang 4 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang40
apt:
packages: ["clang-4.0"]
# Luckily the Trusty install Just Works on Xenial
sources: [*apt_sources, llvm-toolchain-trusty-4.0]
- env: CLANG=clang++-5.0 CXXFLAGS=-Wno-error=unused-command-line-argument
name: "Clang 5 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang50
apt:
packages: ["clang-5.0"]
sources: [*apt_sources, llvm-toolchain-xenial-5.0]
- env: CLANG=clang++-6.0 CXXFLAGS=-Wno-error=unused-command-line-argument CMAKE=1 RELEASE=1
name: "Clang 6 CMake build with Curses"
if: type != pull_request
compiler: clang
addons: &clang60
apt:
packages: ["clang-6.0"]
sources: [*apt_sources, llvm-toolchain-xenial-6.0]
- env: CLANG=clang++-7
name: "Clang 7 Make build with Curses"
if: type != pull_request
compiler: clang
addons: &clang7
apt:
packages: ["clang-7"]
sources: [*apt_sources, llvm-toolchain-xenial-7]
before_script:
- if [ -n "${CLANG}" ]; then COMPILER="$CLANG"; fi
- if [ -n "${COMPILER}" ]; then ${COMPILER} --version; fi
- CXX="$COMPILER"
- export VERSION="${TRAVIS_BUILD_NUMBER}-${BUILD_NAME}"
- source build-scripts/requirements.sh
script:
- build-scripts/build.sh
after_success:
- if [ -n "${CODE_COVERAGE}" ]; then coveralls -b . -i src -e tests --gcov /usr/bin/gcov-6; fi
- if [ -n "${CODE_COVERAGE}" ]; then bash <(curl -s https://codecov.io/bash); fi