-
Notifications
You must be signed in to change notification settings - Fork 392
253 lines (211 loc) · 8.5 KB
/
Copy pathbuild-linux.yml
File metadata and controls
253 lines (211 loc) · 8.5 KB
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
name: Linux build
on: [push, pull_request]
jobs:
precheks:
runs-on: ubuntu-24.04
name: Linux -> Pre-checks
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
submodules: true # only need direct submodules
- name: DiligentCore format validation
working-directory: ${{github.workspace}}/DiligentCore/BuildTools/FormatValidation
shell: bash
run: ./validate_format_linux.sh
- name: DiligentTools format validation
working-directory: ${{github.workspace}}/DiligentTools/BuildTools/FormatValidation
shell: bash
run: ./validate_format_linux.sh
- name: DiligentFX format validation
working-directory: ${{github.workspace}}/DiligentFX/BuildTools/FormatValidation
shell: bash
run: ./validate_format_linux.sh
- name: DiligentSamples format validation
working-directory: ${{github.workspace}}/DiligentSamples/BuildTools/FormatValidation
shell: bash
run: ./validate_format_linux.sh
- name: Codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
ignore_words_list: lod,thirdparty
skip: ./.git,./DiligentCore,./DiligentTools,./DiligentFX,./DiligentSamples
path: .
build:
needs: precheks
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
name: ["GCC", "Clang"]
build_type: ["Debug", "Release"]
cmake_args: ["-DDILIGENT_BUILD_TESTS=ON"]
include:
- name: "GCC"
cmake_generator: "Unix Makefiles"
cc: "gcc-14"
cxx: "g++-14"
- name: "Clang"
cmake_generator: "Ninja"
cc: "clang-18"
cxx: "clang++-18"
- name: "Clang-ASAN"
build_type: "RelWithDebInfo"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON -DDILIGENT_BUILD_FX_TESTS=ON -DDILIGENT_BUILD_SAMPLES_TESTS=ON"
sanitizer: "address"
cc: "clang-18"
cxx: "clang++-18"
- name: "Clang-TSAN"
build_type: "RelWithDebInfo"
cmake_generator: "Ninja"
cmake_args: "-DDILIGENT_BUILD_CORE_TESTS=ON -DDILIGENT_BUILD_TOOLS_TESTS=ON -DDILIGENT_BUILD_FX_TESTS=ON -DDILIGENT_BUILD_SAMPLES_TESTS=ON"
sanitizer: "thread"
cc: "clang-18"
cxx: "clang++-18"
name: Linux -> ${{ matrix.name }}-x64, ${{ matrix.build_type }}
steps:
- name: Clone repository
uses: actions/checkout@v6
with:
submodules: recursive
- name: Clone Test Data
if: success()
uses: actions/checkout@v6
with:
repository: DiligentGraphics/DiligentTestData
path: DiligentTestData
- name: Set up build environment
if: success()
uses: DiligentGraphics/github-action/setup-build-env@v26
with:
platform: Linux
cmake-generator: ${{ matrix.cmake_generator }}
- name: Configure CMake
if: success()
uses: DiligentGraphics/github-action/configure-cmake@v26
with:
cc: ${{ matrix.cc }}
cxx: ${{ matrix.cxx }}
generator: ${{ matrix.cmake_generator }}
build-type: ${{ matrix.build_type }}
cmake-args: ${{ matrix.cmake_args }}
sanitizer: ${{ matrix.sanitizer }}
- name: Build
id: build
if: success()
uses: DiligentGraphics/github-action/build@v26
# Core tests
- name: DiligentCoreTest
if: success()
uses: DiligentGraphics/github-action/run-core-tests@v26
- name: DiligentCoreAPITest VK
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v26
with:
mode: vk_sw
- name: DiligentCoreAPITest VK Compatibility
if: ${{ (success() || failure() && steps.build.outcome == 'success') && (matrix.name == 'Clang' || matrix.name == 'GCC') }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v26
with:
mode: vk_sw
vk-compatibility: true
- name: DiligentCoreAPITest GL
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v26
with:
mode: gl
- name: DiligentCoreAPITest GL with Non-Separable Programs
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-core-gpu-tests@v26
with:
mode: gl
non-separable-progs: true
# Tools tests
- name: DiligentToolsTest
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-tools-tests@v26
- name: DiligentToolsGPUTest VK
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-tools-gpu-tests@v26
with:
mode: vk_sw
- name: DiligentToolsGPUTest GL
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-tools-gpu-tests@v26
with:
mode: gl
- name: HLSL2GLSLConverterTest
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-hlsl2glsl-converter-test@v26
# FX tests
- name: RadientTest
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-radient-tests@v26
- name: DiligentFXGPUTest VK
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-fx-gpu-tests@v26
with:
mode: vk_sw
- name: DiligentFXGPUTest GL
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-fx-gpu-tests@v26
with:
mode: gl
- name: RadientGPUTest VK
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-radient-gpu-tests@v26
with:
mode: vk_sw
- name: RadientGPUTest GL
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-radient-gpu-tests@v26
with:
mode: gl
- name: Clone Radient Test Data
id: radient_test_data
if: ${{ (success() || failure()) && steps.build.outcome == 'success' }}
uses: actions/checkout@v6
with:
repository: DiligentGraphics/DiligentTestData
ref: radient
path: RadientTestData
- name: Clone glTF Sample Assets
id: gltf_sample_assets
if: ${{ (success() || failure()) && steps.build.outcome == 'success' }}
uses: actions/checkout@v6
with:
repository: KhronosGroup/glTF-Sample-Assets
ref: ${{env.DILIGENT_GLTF_SAMPLE_ASSETS_COMMIT}}
path: glTF-Sample-Assets
- name: RadientRenderTest VK
if: ${{ (success() || failure()) && steps.build.outcome == 'success' && steps.radient_test_data.outcome == 'success' && steps.gltf_sample_assets.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-radient-render-tests@v26
with:
mode: vk_sw
models-path: ${{github.workspace}}/glTF-Sample-Assets
assets-path: ${{github.workspace}}/RadientTestData
# Samples tests
- name: Sample Tests Vk
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-sample-tests@v26
with:
mode: "vk_sw"
- name: Sample Tests Vk Compatibility
if: success()
uses: DiligentGraphics/github-action/run-sample-tests@v26
with:
mode: "vk_sw"
vk-compatibility: "true"
- name: Sample Tests GL
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-sample-tests@v26
with:
mode: "gl"
- name: Sample Tests GL with Non-Separable Programs
if: ${{ success() || failure() && steps.build.outcome == 'success' }}
uses: DiligentGraphics/github-action/run-sample-tests@v26
with:
mode: "gl"
non-separable-progs: "true"