@@ -15,18 +15,20 @@ jobs:
15
15
fail-fast : false
16
16
matrix :
17
17
config :
18
- - {
18
+ - {
19
19
name : " Ubuntu GCC Release" ,
20
20
os : ubuntu-latest,
21
21
artifact : " gfxreconstruct-dev-ubuntu-gcc-release" ,
22
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-ubuntu-gcc-release" ,
22
23
type : " release" ,
23
24
build_dir : " build" ,
24
25
cc : " gcc" , cxx: "g++"
25
26
}
26
- - {
27
+ - {
27
28
name : " Ubuntu GCC Debug" ,
28
29
os : ubuntu-latest,
29
30
artifact : " gfxreconstruct-dev-ubuntu-gcc-debug" ,
31
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-ubuntu-gcc-debug" ,
30
32
type : " debug" ,
31
33
build_dir : " dbuild" ,
32
34
cc : " gcc" , cxx: "g++"
55
57
else
56
58
python3 scripts/build.py --config ${{ matrix.config.type }} --skip-check-code-style --parallel 0 --test-apps
57
59
fi
60
+ - name : Run test app test cases
61
+ id : test_apps
62
+ run : |
63
+ cd ${{matrix.config.build_dir}}/linux/x64/output/test
64
+ sudo useradd test
65
+ sudo usermod -a -G docker test
66
+ chmod -R g+w .
67
+ sudo -n -u test ./run-tests.sh
68
+ - name : Upload test failure artifacts
69
+ uses : actions/upload-artifact@v4
70
+ if : ${{ failure() && steps.test_apps.conclusion == 'failure' }}
71
+ with :
72
+ name : ${{ matrix.config.test_failure_artifact }}
73
+ path : ${{matrix.config.build_dir}}/linux/x64/output/test
58
74
- name : Prepare artifacts
59
75
run : |
60
76
cp LICENSE.txt ${{ matrix.config.build_dir }}/linux/x64/output/bin/
@@ -77,18 +93,20 @@ jobs:
77
93
fail-fast : false
78
94
matrix :
79
95
config :
80
- - {
96
+ - {
81
97
name : " Windows MSVC Release" ,
82
98
os : windows-latest,
83
99
artifact : " gfxreconstruct-dev-windows-msvc-release" ,
100
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-windows-msvc-release" ,
84
101
type : " release" ,
85
102
build_dir : " build" ,
86
103
cc : " cl" , cxx: "cl"
87
104
}
88
- - {
105
+ - {
89
106
name : " Windows MSVC Debug" ,
90
107
os : windows-latest,
91
108
artifact : " gfxreconstruct-dev-windows-msvc-debug" ,
109
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-windows-msvc-debug" ,
92
110
type : " debug" ,
93
111
build_dir : " dbuild" ,
94
112
cc : " cl" , cxx: "cl"
@@ -120,6 +138,20 @@ jobs:
120
138
- name : Run build script
121
139
run : |
122
140
python scripts\build.py --skip-check-code-style --config ${{ matrix.config.type }} --parallel 0 --test-apps
141
+ - name : Run test app test cases
142
+ id : test_apps
143
+ run : |
144
+ curl.exe -o vulkan-sdk.zip https://sdk.lunarg.com/sdk/download/1.3.296.0/windows/VulkanRT-1.3.296.0-Components.zip
145
+ Expand-Archive vulkan-sdk.zip -DestinationPath $pwd\vulkan-sdk
146
+ $env:Path += ";$pwd\vulkan-sdk\VulkanRT-1.3.296.0-Components\x64"
147
+ cd ${{matrix.config.build_dir}}\windows\x64\output\test
148
+ ./run-tests.ps1
149
+ - name : Upload test failure artifacts
150
+ uses : actions/upload-artifact@v4
151
+ if : ${{ failure() && steps.test_apps.conclusion == 'failure' }}
152
+ with :
153
+ name : ${{ matrix.config.test_failure_artifact }}
154
+ path : ${{matrix.config.build_dir}}\windows\x64\output\test
123
155
- name : Prepare artifacts
124
156
run : |
125
157
copy LICENSE.txt ${{ matrix.config.build_dir }}\windows\x64\output\bin\
@@ -141,17 +173,19 @@ jobs:
141
173
fail-fast : false
142
174
matrix :
143
175
config :
144
- - {
176
+ - {
145
177
name : " macOS Release" ,
146
178
os : macos-latest,
147
179
artifact : " gfxreconstruct-dev-macOS-release" ,
180
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-macOS-release" ,
148
181
type : " release" ,
149
182
build_dir : " build"
150
183
}
151
- - {
184
+ - {
152
185
name : " macOS Debug" ,
153
186
os : macos-latest,
154
187
artifact : " gfxreconstruct-dev-macOS-debug" ,
188
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-macOS-debug" ,
155
189
type : " debug" ,
156
190
build_dir : " dbuild"
157
191
}
@@ -172,6 +206,31 @@ jobs:
172
206
- name : Run build script
173
207
run : |
174
208
python3 scripts/build.py --skip-check-code-style --config ${{ matrix.config.type }} --cmake-extra "CMAKE_PREFIX_PATH=$HOME/deps" --cmake-extra CMAKE_OSX_DEPLOYMENT_TARGET=11.0 --parallel 0 --test-apps
209
+ - name : Run test app test cases
210
+ id : test_apps
211
+ run : |
212
+ WORKING_PATH="$(pwd)/${{matrix.config.build_dir}}/darwin/universal/output/test"
213
+ cd $WORKING_PATH
214
+ curl https://sdk.lunarg.com/sdk/download/1.4.304.0/mac/vulkansdk-macos-1.4.304.0.zip -o ./vulkan-sdk.zip
215
+ unzip ./vulkan-sdk.zip -d ./vulkan-sdk
216
+ sudo ./vulkan-sdk/InstallVulkan.app/Contents/MacOS/InstallVulkan --root $(pwd)/VulkanSDK/1.3.304.0 --accept-licenses --default-answer --confirm-command install
217
+ sudo dscl . -create /Users/test
218
+ sudo dscl . append /Groups/staff GroupMembership test
219
+ sudo dscl . -create /Users/test UserShell /bin/bash
220
+ sudo dscl . -create /Users/test RealName "Test"
221
+ sudo dscl . -create /Users/test UniqueID "1001"
222
+ sudo dscl . -create /Users/test PrimaryGroupID 80
223
+ sudo dscl . -create /Users/test NFSHomeDirectory /Users/test
224
+ sudo mkdir -p /Users/test
225
+ sudo chown -R test:staff /Users/test
226
+ sudo chmod -R g+w .
227
+ sudo su - test -c "cd $WORKING_PATH && VULKAN_LIBRARY_PATH=$(pwd)/VulkanSDK/1.3.304.0/macOS/lib/libvulkan.dylib ./run-tests_macos.sh"
228
+ - name : Upload test failure artifacts
229
+ uses : actions/upload-artifact@v4
230
+ if : ${{ failure() && steps.test_apps.conclusion == 'failure' }}
231
+ with :
232
+ name : ${{ matrix.config.test_failure_artifact }}
233
+ path : ${{matrix.config.build_dir}}/darwin/universal/output/test
175
234
- name : Prepare artifacts
176
235
run : |
177
236
cp LICENSE.txt ${{ matrix.config.build_dir }}/darwin/universal/output/bin/
@@ -198,58 +257,60 @@ jobs:
198
257
fail-fast : false
199
258
matrix :
200
259
config :
201
- - {
260
+ - {
202
261
name : " Android Debug" ,
203
262
os : ubuntu-latest,
204
263
type : " debug" ,
205
- artifact : " gfxreconstruct-dev-android-debug"
264
+ artifact : " gfxreconstruct-dev-android-debug" ,
265
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-android-debug"
206
266
}
207
- - {
267
+ - {
208
268
name : " Android Release" ,
209
269
os : ubuntu-latest,
210
270
type : " release" ,
211
- artifact : " gfxreconstruct-dev-android-release"
271
+ artifact : " gfxreconstruct-dev-android-release" ,
272
+ test_failure_artifact : " gfxreconstruct-dev-test-failure-android-release"
212
273
}
213
274
steps :
214
- - name : Clone repository
215
- uses : actions/checkout@v4
216
- with :
217
- submodules : ' recursive'
218
- - name : Update submodules
219
- run : |
220
- git submodule update --init
221
- - name : Set up Java
222
- uses : " actions/setup-java@v4"
223
- with :
224
- java-version : 17
225
- distribution : " temurin"
226
- - name : Gradle build
227
- run : |
228
- cd android
229
- if [ "${{ matrix.config.type }}" == "release" ]
230
- then
231
- sh gradlew assembleRelease -Parm64-v8a
232
- else
233
- sh gradlew assembleDebug -Parm64-v8a
234
- fi
235
- - name : Prepare artifacts
236
- run : |
237
- mkdir gfxreconstruct-dev
238
- mkdir gfxreconstruct-dev/layer
239
- mkdir gfxreconstruct-dev/tools
240
- cp LICENSE.txt gfxreconstruct-dev/
241
- cp LICENSE_ThirdParty.txt gfxreconstruct-dev/
242
- cp USAGE_android.md gfxreconstruct-dev/
243
- cp layer/vk_layer_settings.txt gfxreconstruct-dev/
244
- if [ "${{ matrix.config.type }}" == "release" ]
245
- then
246
- cp -r android/layer/build/intermediates/cxx/RelWithDebInfo/*/obj/arm64-v8a gfxreconstruct-dev/layer/
247
- else
248
- cp android/tools/replay/build/outputs/apk/debug/replay-debug.apk gfxreconstruct-dev/tools/
249
- fi
250
- cp android/scripts/gfxrecon.py gfxreconstruct-dev/tools/
251
- - name : Upload artifacts
252
- uses : actions/upload-artifact@v4
253
- with :
254
- name : ${{ matrix.config.artifact }}
255
- path : ./gfxreconstruct-dev
275
+ - name : Clone repository
276
+ uses : actions/checkout@v4
277
+ with :
278
+ submodules : ' recursive'
279
+ - name : Update submodules
280
+ run : |
281
+ git submodule update --init
282
+ - name : Set up Java
283
+ uses : " actions/setup-java@v4"
284
+ with :
285
+ java-version : 17
286
+ distribution : " temurin"
287
+ - name : Gradle build
288
+ run : |
289
+ cd android
290
+ if [ "${{ matrix.config.type }}" == "release" ]
291
+ then
292
+ sh gradlew assembleRelease -Parm64-v8a
293
+ else
294
+ sh gradlew assembleDebug -Parm64-v8a
295
+ fi
296
+ - name : Prepare artifacts
297
+ run : |
298
+ mkdir gfxreconstruct-dev
299
+ mkdir gfxreconstruct-dev/layer
300
+ mkdir gfxreconstruct-dev/tools
301
+ cp LICENSE.txt gfxreconstruct-dev/
302
+ cp LICENSE_ThirdParty.txt gfxreconstruct-dev/
303
+ cp USAGE_android.md gfxreconstruct-dev/
304
+ cp layer/vk_layer_settings.txt gfxreconstruct-dev/
305
+ if [ "${{ matrix.config.type }}" == "release" ]
306
+ then
307
+ cp -r android/layer/build/intermediates/cxx/RelWithDebInfo/*/obj/arm64-v8a gfxreconstruct-dev/layer/
308
+ else
309
+ cp android/tools/replay/build/outputs/apk/debug/replay-debug.apk gfxreconstruct-dev/tools/
310
+ fi
311
+ cp android/scripts/gfxrecon.py gfxreconstruct-dev/tools/
312
+ - name : Upload artifacts
313
+ uses : actions/upload-artifact@v4
314
+ with :
315
+ name : ${{ matrix.config.artifact }}
316
+ path : ./gfxreconstruct-dev
0 commit comments