-
Notifications
You must be signed in to change notification settings - Fork 278
164 lines (162 loc) · 5.43 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
name: General build matrix
on:
push:
branches:
- upload
pull_request:
branches:
- upload
jobs:
skip-duplicates:
continue-on-error: true
runs-on: ubuntu-22.04
# Map a step output to a job output
outputs:
should_skip: ${{ 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
strategy:
matrix:
include:
- compiler: g++-12
os: ubuntu-22.04
cmake: 0
tiles: 0
sound: 0
lua: 0
test-stage: 1
libbacktrace: 1
title: GCC 12, Ubuntu, Curses
native: linux64
- compiler: g++-12
os: ubuntu-22.04
cmake: 1
tiles: 1
sound: 1
lua: 1
languages: all
native: linux64
title: GCC 12, Ubuntu, Tiles, Sound, Lua, CMake, Languages
- compiler: g++-12
os: ubuntu-22.04
cmake: 0
tiles: 1
sound: 1
lua: 1
test-stage: 1
libbacktrace: 1
title: GCC 12, Ubuntu, Tiles, Sound, Lua
native: linux64
- compiler: g++-12
os: ubuntu-22.04
cmake: 0
tiles: 1
sound: 0
lua: 0
sanitize: address
native: linux64
title: GCC 12, Ubuntu, Tiles, NoSound, ASan
- compiler: clang++-14
os: ubuntu-22.04
cmake: 0
tiles: 1
sound: 0
lua: 0
sanitize: address,undefined
native: linux64
title: Clang 14, Ubuntu, Tiles, NoSound, ASan, UBSan
- compiler: clang++
os: macos-12
cmake: 0
tiles: 1
sound: 1
lua: 1
test-stage: 1
native: osx
grep_clang_version_rxp: "14\\.[0-9]+\\.[0-9]+"
title: Clang 14, macOS 12, Tiles, Sound, Localize, Lua
name: ${{ matrix.title }}
runs-on: ${{ matrix.os }}
env:
ZSTD_CLEVEL: 17
CMAKE: ${{ matrix.cmake }}
COMPILER: ${{ matrix.compiler }}
OS: ${{ matrix.os }}
TILES: ${{ matrix.tiles }}
SOUND: ${{ matrix.sound }}
LUA: ${{ matrix.lua }}
SANITIZE: ${{ matrix.sanitize }}
TEST_STAGE: ${{ matrix.test-stage }}
LANGUAGES: ${{ matrix.languages }}
EXTRA_TEST_OPTS:
LIBBACKTRACE: ${{ matrix.libbacktrace }}
NATIVE: ${{ matrix.native }}
RELEASE: 1
SKIP: ${{ needs.skip-duplicates.outputs.should_skip == 'true' }}
steps:
- name: checkout repository
if: ${{ env.SKIP == 'false' }}
uses: actions/checkout@v3
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
# ubuntu 22.04 has GCC 12 and clang 14
# - name: install missing compiler (ubuntu)
# if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && matrix.compiler == 'g++-11' }}
# run: sudo apt-get install ${{ matrix.compiler }}
- name: check compiler (mac)
if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }}
run: |
${{ matrix.compiler }} --version
# Ensure that it is actually needed version
${{ matrix.compiler }} --version | grep -q -E "${{ matrix.grep_clang_version_rxp }}"
- 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 "date=$(/bin/date -u "+%Y%m%d%H%M")" >> $GITHUB_OUTPUT
shell: bash
- name: ccache cache files (ubuntu)
if: ${{ env.SKIP == 'false' && runner.os == 'Linux' }}
uses: actions/cache@v3
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@v3
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
- name: upload artifacts if failed
uses: actions/upload-artifact@v1
if: failure()
with:
name: cata_test
path: tests/cata_test