-
Notifications
You must be signed in to change notification settings - Fork 5
251 lines (238 loc) · 8.44 KB
/
ci.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
name: C/C++ CI
on:
push:
branches: [ main ]
paths:
- "**.c"
- "**.cpp"
- "**.h"
- "**.hpp"
- "**.inl"
- "**.comp"
- "**.vert"
- "**.frag"
- "**meson.build"
- "**ci.yml"
pull_request:
branches: [ main ]
paths:
- "**.c"
- "**.cpp"
- "**.h"
- "**.hpp"
- "**.inl"
- "**.comp"
- "**.vert"
- "**.frag"
- "*meson.build"
# NOTE: we currently don't test all permutations of {release, debug, ...},
# {tracy, !tracy}, {gcc, clang, msvc, msvc-ninja} since it would be many
# TODO: integration tests not enabled at the moment.
# The vulkan loader on the ci ubuntu image crashes randomly on init.
# TODO: using old validation layers for integration tests. Build from source?
# could use build cache or something
jobs:
linux-gcc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install meson ninja
- run: sudo apt-get -y update
- name: Install deps
run: sudo apt-get -y -f install libvulkan-dev libvulkan1 vulkan-tools glslang-tools
libxkbcommon-dev libwayland-dev libxcb1-dev wayland-protocols libxcb-ewmh-dev
libxcb-icccm4-dev libxcb-shm0-dev libxcb-present-dev libxcb-xinput-dev libxcb-xkb-dev
libxkbcommon-x11-dev libx11-dev libx11-xcb-dev vulkan-validationlayers valgrind
# TODO: integration tests run in theory but crash inside vulkan
# loader on ci, can't reproduce locally :(
- run: meson setup build/ --backend=ninja
-Dunit-tests=true
-Djson-config-absolute-path=true
-Dintegration-tests=false
-Dx11-hook=false
-Dtracy=true
env:
CC: gcc
# TODO: no idea why this is needed using 'meson test' but not 'ninja test'.
# sounds like a meson bug.
# - run: ninja -C build subprojects/vkmockicd/libVkICD_mock_icd.so
# meson test -C build/ -v
# valgrind --leak-check=full?
- run: meson test -C build
--wrapper 'valgrind --leak-check=full --error-exitcode=1 --suppressions=../docs/valgrind.sup'
--print-errorlogs
# NOTE: the ci cpus seem to need this for tracy. Might result
# in issues (inconsistent timings between cpu cores or something),
# we don't care about it here
env:
TRACY_NO_INVARIANT_CHECK: 1
linux-gcc-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install meson ninja
- run: sudo apt-get -y update
- name: Install deps
run: sudo apt-get -y -f install libvulkan-dev libvulkan1 vulkan-tools glslang-tools
libxkbcommon-dev libwayland-dev libxcb1-dev wayland-protocols libxcb-ewmh-dev
libxcb-icccm4-dev libxcb-shm0-dev libxcb-present-dev libxcb-xinput-dev libxcb-xkb-dev
libxkbcommon-x11-dev libx11-dev libx11-xcb-dev
- run: meson setup build/ --backend=ninja
-Dunit-tests=true
-Dintegration-tests=false
-Dx11-hook=false
-Dbuildtype=release
env:
CC: gcc
- run: meson test -C build/ -v
linux-clang:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
- run: pip install meson ninja
- run: sudo apt-get -y update
- name: Install deps
run: sudo apt-get -y -f install libvulkan-dev libvulkan1 vulkan-tools glslang-tools
libxkbcommon-dev libwayland-dev libxcb1-dev wayland-protocols libxcb-ewmh-dev
libxcb-icccm4-dev libxcb-shm0-dev libxcb-present-dev libxcb-xinput-dev libxcb-xkb-dev
libxkbcommon-x11-dev libx11-dev libx11-xcb-dev
- run: meson setup build/ --backend=ninja
-Dunit-tests=true
-Dintegration-tests=false
-Dx11-hook=false
- run: meson test -C build/ -v
linux-clang-tracy-debugoptimized:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- name: Set up Clang
uses: egor-tensin/setup-clang@v1
with:
version: latest
- run: pip install meson ninja
- run: sudo apt-get -y update
- name: Install deps
run: sudo apt-get -y -f install libvulkan-dev libvulkan1 vulkan-tools glslang-tools
libxkbcommon-dev libwayland-dev libxcb1-dev wayland-protocols libxcb-ewmh-dev
libxcb-icccm4-dev libxcb-shm0-dev libxcb-present-dev libxcb-xinput-dev libxcb-xkb-dev
libxkbcommon-x11-dev libx11-dev libx11-xcb-dev
- run: meson setup build/ --backend=ninja
-Dunit-tests=true
-Dintegration-tests=false
-Dx11-hook=false
-Dtracy=true
-Dbuildtype=debugoptimized
- run: meson test -C build/ -v
# See https://dvdhrm.github.io/2021/04/21/meson-msvc-github-actions/
windows-ninja:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install ninja
# TODO, tmp workaround: See https://github.com/mesonbuild/meson/pull/9918
- run: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- run: meson setup build/ --backend=ninja
-Dunit-tests=true
- run: meson test -C build/ -v
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install ninja
# TODO, tmp workaround: See https://github.com/mesonbuild/meson/pull/9918
- run: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- run: meson setup build/
-Dunit-tests=true
-Dintegration-tests=false
- run: meson test -C build/ -v
windows-release:
runs-on: windows-latest
env:
VULKAN_SDK: c:\VulkanSDK\1.2.198.1
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
# Vulkan SDK, needed for integration tests
# - name: Download Vulkan SDK
# run: curl -L --silent --show-error --output VulkanSDK.exe https://sdk.lunarg.com/sdk/download/1.2.198.1/windows/VulkanSDK-1.2.198.1-Installer.exe
# - name: Install Vulkan SDK
# run: .\VulkanSDK.exe --accept-licenses --default-answer --confirm-command install
- run: pip install ninja
# TODO, tmp workaround: See https://github.com/mesonbuild/meson/pull/9918
- run: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- run: meson setup build/
-Dunit-tests=true
-Dintegration-tests=false
-Dbuildtype=release
-Ddebug=true
- run: meson test -C build/ -v
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: Windows Binaries
path: |
build/VkLayer_live_introspection.dll
build/VkLayer_live_introspection.json
build/VkLayer_live_introspection.lib
build/VkLayer_live_introspection.pdb
build/register_layer.bat
windows-release-tracy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.x'
- run: pip install ninja
# TODO, tmp workaround: See https://github.com/mesonbuild/meson/pull/9918
- run: pip install git+https://github.com/frida/meson.git@f7f25b19a8d71cebf8e2934733eb041eb6862eee
- name: Prepare MSVC
uses: bus1/cabuild/action/msdevshell@v1
with:
architecture: x64
- run: meson setup build/
-Dunit-tests=true
-Dbuildtype=release
-Dtracy=true
- run: meson test -C build/ -v
# TODO:
# - test 32-bit build? Not sure if we even want to support it though.
# - test mingw? Just not calling vs vars script actually already calls mingw.
# But the version does not seem to be new enough
# - test other gcc versions? Current ubuntu build only has v9