-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
198 lines (159 loc) · 6.63 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
# ===========================================================================
# Copyright (C) 2013 - 2019, OpenJK contributors
# Copyright (C) 2019 - 2020, CleanJoKe contributors
# This file is part of the OpenJK source code.
# OpenJK is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
# ===========================================================================
# https://blog.travis-ci.com/
language: cpp
os: linux
dist: bionic
# https://docs.travis-ci.com/user/environment-variables/
# https://docs.travis-ci.com/user/reference/overview/
# https://docs.travis-ci.com/user/job-lifecycle/
# For arm64, check :
# https://docs.travis-ci.com/user/multi-cpu-architectures
# Linux
# https://docs.travis-ci.com/user/reference/bionic/
# macOS
# https://docs.travis-ci.com/user/reference/osx/
# Only Windows Server, version 1803 is currently supported with Visual Studio 2017. (12 january 2020)
# https://docs.travis-ci.com/user/reference/windows/
# https://docs.travis-ci.com/user/installing-dependencies
# CMAKE_BUILD_TYPE defaulted to Release
# ARCH defaulted to x64 (x64 VMs)
# Cross-compiling using Toolchains (MinGW)
# https://launchpad.net/ubuntu/+source/gcc-mingw-w64
# https://gitlab.kitware.com/cmake/community/-/wikis/doc/cmake/cross_compiling/Mingw
# https://docs.travis-ci.com/user/caching/
cache: ccache
before_install:
- |
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
chmod +x ./continuous_integration/travis/install/linux.sh ;
export CMAKE_VERSION=cmake-3.16.3 ;
fi
- if [ "${TRAVIS_OS_NAME}" = "linux" ] || [ "${TRAVIS_OS_NAME}" = "osx" ]; then chmod +x ./continuous_integration/travis/build/linux_osx.sh ; fi
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then export PATH=$MSBUILD_PATH:$PATH ; fi
install:
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./continuous_integration/travis/install/linux.sh "${ARCH=x64}" "${TRAVIS_COMPILER}" "${TRAVIS_CPU_ARCH}" "${CMAKE_VERSION}" ; fi
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then ./continuous_integration/travis/install/windows.bat ; fi
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH" ; fi
before_script:
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${TRAVIS_CPU_ARCH}" = "amd64" ]; then export PATH=`pwd`/${CMAKE_VERSION}/bin:$PATH ; fi
- |
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${TRAVIS_COMPILER}" = "gcc" ]; then
export CC=gcc-9 ;
export CXX=g++-9 ;
fi
- |
if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${TRAVIS_COMPILER}" = "clang" ]; then
export CC=clang-9 ;
export CXX=clang++-9 ;
fi
script:
- cmake --version
- if [ "${TRAVIS_OS_NAME}" = "linux" ] || [ "${TRAVIS_OS_NAME}" = "osx" ]; then ./continuous_integration/travis/build/linux_osx.sh "${ARCH=x64}" "${CMAKE_BUILD_TYPE=Release}" ; fi
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then ./continuous_integration/travis/build/windows.bat "${ARCH=x64}" "${CMAKE_BUILD_TYPE=Release}" ; fi
addons:
apt:
sources:
# For gcc-9 g++-9 / gcc-9-multilib g++-9-multilib (see continuous_integration -> travis -> install -> linux)
- sourceline: 'ppa:ubuntu-toolchain-r/test'
homebrew:
packages:
# Install sdl2, ccache and update cmake
- sdl2
- ccache
- cmake
update: true
jobs:
include:
# ===========================
# RELEASE
# ===========================
- name: "(Release) x64 [GCC 9] - Ubuntu 18.04"
compiler: gcc
- name: "(Release) arm64 [GCC 9] - Ubuntu 18.04"
arch: arm64
compiler: gcc
# - name: "(Release) x64 [clang 9] - Ubuntu 18.04"
# compiler: clang
# - name: "(Release) arm64 [clang 9] - Ubuntu 18.04"
# arch: arm64
# compiler: clang
- name: "(Release) x64 [Visual Studio 2017] - Windows Server, version 1803"
os: windows
env: MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- name: "(Release) x64 [Apple clang version 11.0.0] - macOS 10.14"
os: osx
osx_image: xcode11.3
compiler: clang
- name: "(Release) x64 [MinGW-64 7] - Ubuntu 18.04"
compiler: gcc
env: ARCH=x86_64-w64-mingw32
- name: "(Release) x86 [GCC 9] - Ubuntu 18.04"
compiler: gcc
env: ARCH=x86
# - name: "(Release) x86 [clang 9] - Ubuntu 18.04"
# compiler: clang
# env: ARCH=x86
- name: "(Release) x86 [Visual Studio 2017] - Windows Server, version 1803"
os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- ARCH=x86
- name: "(Release) x86 [MinGW-64 7] - Ubuntu 18.04"
compiler: gcc
env: ARCH=i686-w64-mingw32
# =========================
# DEBUG
# =========================
- name: "(Debug) x64 [GCC 9] - Ubuntu 18.04"
compiler: gcc
env: CMAKE_BUILD_TYPE=Debug
# - name: "(Debug) arm64 [GCC 9] - Ubuntu 18.04"
# arch: arm64
# compiler: gcc
# env: CMAKE_BUILD_TYPE=Debug
# - name: "(Debug) x64 [clang 9] - Ubuntu 18.04"
# compiler: clang
# env: CMAKE_BUILD_TYPE=Debug
# - name: "(Debug) arm64 [clang 9] - Ubuntu 18.04"
# arch: arm64
# compiler: clang
# env: CMAKE_BUILD_TYPE=Debug
- name: "(Debug) x64 [Visual Studio 2017] - Windows Server, version 1803"
os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- CMAKE_BUILD_TYPE=Debug
# - name: "(Debug) x64 [Apple clang version 11.0.0] - macOS 10.14"
# os: osx
# osx_image: xcode11.3
# compiler: clang
# env: CMAKE_BUILD_TYPE=Debug
- name: "(Debug) x86 [GCC 9] - Ubuntu 18.04"
compiler: gcc
env:
- CMAKE_BUILD_TYPE=Debug
- ARCH=x86
# - name: "(Debug) x86 [clang 9] - Ubuntu 18.04"
# compiler: clang
# env:
# - CMAKE_BUILD_TYPE=Debug
# - ARCH=x86
- name: "(Debug) x86 [Visual Studio 2017] - Windows Server, version 1803"
os: windows
env:
- MSBUILD_PATH="c:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin"
- CMAKE_BUILD_TYPE=Debug
- ARCH=x86