-
Notifications
You must be signed in to change notification settings - Fork 154
70 lines (62 loc) · 2.75 KB
/
Copy pathbuild-win32-shader.yml
File metadata and controls
70 lines (62 loc) · 2.75 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
name: Build Win32 Precompiled Shader Test
on:
workflow_call:
inputs:
platform:
required: false
type: string
default: x64
jobs:
build:
runs-on: windows-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v5
- name: Cache FetchContent deps
uses: actions/cache@v4
with:
path: |
${{ github.workspace }}/.fc-cache
!${{ github.workspace }}/.fc-cache/*-build
!${{ github.workspace }}/.fc-cache/*-build/**
key: fc-v2-win32shader-${{ inputs.platform }}-${{ hashFiles('**/CMakeLists.txt') }}
restore-keys: |
fc-v2-win32shader-${{ inputs.platform }}-
- name: Generate solution
shell: cmd
run: |
cmake -G "Visual Studio 17 2022" ^
-B build/Win32_${{ inputs.platform }}_PrecompiledShaderTest ^
-A ${{ inputs.platform }} ^
-D FETCHCONTENT_BASE_DIR=${{ github.workspace }}/.fc-cache ^
-D FETCHCONTENT_UPDATES_DISCONNECTED=ON ^
-D BX_CONFIG_DEBUG=ON ^
-D GRAPHICS_API=D3D11 ^
-D BGFX_CONFIG_MAX_FRAME_BUFFERS=256 ^
-D BABYLON_DEBUG_TRACE=ON ^
-D BABYLON_NATIVE_PLUGIN_NATIVEENGINE_COMPILESHADERS=OFF
- name: Build PrecompiledShaderTest
shell: cmd
run: |
cmake --build build/Win32_${{ inputs.platform }}_PrecompiledShaderTest --config RelWithDebInfo --target PrecompiledShaderTest -- /m
- name: Enable Crash Dump
shell: cmd
run: |
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PrecompiledShaderTest.exe" /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PrecompiledShaderTest.exe" /v DumpType /t REG_DWORD /d 2 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PrecompiledShaderTest.exe" /v DumpCount /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps\PrecompiledShaderTest.exe" /v DumpFolder /t REG_SZ /d "%RUNNER_TEMP%\Dumps" /f
- name: Run Precompiled Shader Test
shell: cmd
run: |
cd build\Win32_${{ inputs.platform }}_PrecompiledShaderTest\Apps\PrecompiledShaderTest\RelWithDebInfo
PrecompiledShaderTest
- name: Upload Crash Dumps
if: failure()
uses: actions/upload-artifact@v6
with:
name: precompiled-shader-test-crash-dumps
path: |
build/Win32_${{ inputs.platform }}_PrecompiledShaderTest/Apps/PrecompiledShaderTest/RelWithDebInfo/PrecompiledShaderTest.*
${{ runner.temp }}/Dumps/
if-no-files-found: ignore