forked from CleverRaven/Cataclysm-DDA
-
Notifications
You must be signed in to change notification settings - Fork 0
252 lines (242 loc) · 8.55 KB
/
matrix.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
name: General build matrix
on:
push:
branches:
- master
pull_request:
branches:
- master
# Overall strategy for what sorts of builds to include:
# We want a build for the newest and oldest supported version of each compiler.
# We want a build for each platform.
# 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
# - LOCALIZE=0
# - LTO=1
# - Tests with important mods enabled (Magiclysm)
# - A clang-tidy run
# - SANITIZE=address,undefined
# We try to minimize the number of builds subject to those constraints.
#
# To see what toolchains are available, the following may be useful:
# https://launchpad.net/%7Eubuntu-toolchain-r/+archive/ubuntu/test/+index
# https://apt.llvm.org/
jobs:
skip-duplicates-code:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip_code: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**", "data/**", "lang/**"]'
skip-duplicates-data:
continue-on-error: true
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip_data: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
cancel_others: 'true'
paths_ignore: '["android/**", "build-data/osx/**", "doc/**", "doxygen_doc/**", "lgtm/**", "msvc-**", "object_creator/**", "tools/**", "utilities/**"]'
varied_builds:
needs: [ skip-duplicates-code, skip-duplicates-data ]
strategy:
max-parallel: 1
matrix:
include:
- compiler: g++-9
os: ubuntu-latest
release: 1
cmake: 0
tiles: 0
sound: 0
localize: 1
test-stage: 1
gold: 1
lto: 1
native: linux64
archive-success: basic-build
dont_skip_data_only_changes: 1
title: Basic Build and Test (GCC 9, Curses, LTO)
- compiler: clang++-12
os: ubuntu-latest
release: 0
cmake: 0
tiles: 1
sound: 0
localize: 1
native: linux64
sanitize: address
mods: --mods=magiclysm
dont_skip_data_only_changes: 1
title: Clang 12, Ubuntu, Tiles, ASan
- compiler: g++-11
os: ubuntu-latest
release: 0
cmake: 0
tiles: 0
sound: 0
localize: 1
native: linux64
sanitize: address
title: GCC 11, Ubuntu, Curses, ASan
- compiler: clang++
os: macos-10.15
release: 0
cmake: 0
native: osx
sanitize: undefined
tiles: 1
sound: 1
localize: 1
title: Clang 12, macOS 10.15, Tiles, Sound, UBSan
- compiler: g++
os: ubuntu-latest
release: 0
cmake: 0
native:
tiles: 1
sound: 1
localize: 1
test-stage: 1
title: GCC 11, Ubuntu cross-compile to MinGW-Win64, Tiles, Sound
ldflags: -static-libgcc -static-libstdc++
mxe_target: x86_64-w64-mingw32.static.gcc11
wine: wine
- compiler: clang++-6.0
os: ubuntu-18.04
tiles: 0
sound: 0
release: 1
cmake: 0
localize: 1
native: linux64
title: Clang 6, Ubuntu, Curses, Release
- compiler: g++-7
os: ubuntu-18.04
release: 0
cmake: 1
tiles: 1
sound: 1
localize: 0
native: linux64
title: GCC 7, Ubuntu, Tiles, Sound, CMake
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
MXE_TARGET: ${{ matrix.mxe_target }}
WINE: ${{ matrix.wine }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.sound }}
LOCALIZE: ${{ matrix.localize }}
MODS: ${{ matrix.mods }}
SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
LDFLAGS: ${{ matrix.ldflags }}
EXTRA_TEST_OPTS: --error-format=github-action
NUM_TEST_JOBS: ${{ matrix.num_test_jobs }}
NATIVE: ${{ matrix.native }}
GOLD: ${{ matrix.gold }}
LTO: ${{ matrix.lto }}
RELEASE: ${{ matrix.release }}
ARCHIVE_SUCCESS: ${{ matrix.archive-success }}
SKIP: ${{ ( github.event.pull_request.draft == true && matrix.title != 'Basic Build and Test (GCC 9, Curses, LTO)' ) || ( matrix.dont_skip_data_only_changes == 0 && needs.skip-duplicates.outputs.should_skip_code == 'true' ) || ( matrix.dont_skip_data_only_changes != 0 && needs.skip-duplicates-mods.outputs.should_skip_data == 'true' ) }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: install dependencies (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }}
run: |
sudo apt-get update
sudo apt-get install libncursesw5-dev libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev \
libsdl2-mixer-dev libpulse-dev ccache gettext parallel
- name: install old GCC (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'g++-7' || matrix.compiler == 'g++-8') }}
run: |
sudo apt-get install g++-7 g++-8
- name: install new GCC (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'g++-11') }}
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-11
- name: install old Clang (Ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-6.0') }}
run: |
sudo apt-get install clang-6.0
- name: install dependencies (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
HOMEBREW_NO_AUTO_UPDATE=yes HOMEBREW_NO_INSTALL_CLEANUP=yes brew install sdl2 sdl2_image sdl2_ttf sdl2_mixer gettext ccache parallel
- name: prepare
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/requirements.sh
- name: Get Date
id: get-date
if: ${{ env.SKIP == 'false' }}
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d%H%M")"
shell: bash
- name: ccache cache files (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }}
uses: actions/cache@v2
with:
path: ~/.ccache
key: ccache-linux-${{ matrix.compiler }}-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-linux-${{ matrix.compiler }}-
- name: ccache cache files (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
uses: actions/cache@v2
with:
path: /Users/runner/Library/Caches/ccache
key: ccache-mac-${{ matrix.compiler }}-${{ steps.get-date.outputs.date }}
restore-keys: |
ccache-mac-${{ matrix.compiler }}-
- uses: ammaraskar/gcc-problem-matcher@master
- name: build and test
if: ${{ env.SKIP == 'false' }}
run: bash ./build-scripts/build.sh
- run: |
echo ${{ github.event.number }} > pull_request_id
echo "true" > ${{ env.ARCHIVE_SUCCESS }}
if: ${{ env.ARCHIVE_SUCCESS && success() }}
- run: |
echo ${{ github.event.number }} > pull_request_id
echo "false" > ${{ env.ARCHIVE_SUCCESS }}
if: ${{ env.ARCHIVE_SUCCESS && failure() }}
- uses: actions/upload-artifact@v2
if: ${{ always() && env.ARCHIVE_SUCCESS }}
with:
name: pull_request_id
path: pull_request_id
- uses: actions/upload-artifact@v2
if: ${{ always() && env.ARCHIVE_SUCCESS }}
with:
name: ${{ env.ARCHIVE_SUCCESS }}
path: ${{ env.ARCHIVE_SUCCESS }}
- name: upload artifacts if failed
uses: actions/upload-artifact@v2
if: failure()
with:
name: cata_test
path: tests/cata_test*
if-no-files-found: ignore