-
Notifications
You must be signed in to change notification settings - Fork 138
76 lines (65 loc) · 3.04 KB
/
ci_windows.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
name: MS Windows
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build_windows:
strategy:
matrix:
generator: [Visual Studio 17 2022, Visual Studio 16 2019]
arch: [x64, Win32]
lib: [Shared, Static]
config: [Release, Debug]
fail-fast: false
runs-on: ${{ matrix.generator == 'Visual Studio 17 2022' && 'windows-latest' || 'windows-2019' }}
env:
README: ${{ github.workspace }}/README.txt
CONFIG: ${{ matrix.config == 'Debug' && 'Debug' || 'RelWithDebInfo' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake
run: >
cmake -G "${{ matrix.generator }}" -A "${{ matrix.arch }}" -S . -B ${{ github.workspace }}/${{ matrix.arch }}
-DLLGL_BUILD_STATIC_LIB=${{ matrix.lib == 'Static' && 'ON' || 'OFF' }}
-DLLGL_BUILD_RENDERER_OPENGL=ON
-DLLGL_BUILD_RENDERER_DIRECT3D11=ON
-DLLGL_BUILD_RENDERER_DIRECT3D12=ON
-DLLGL_BUILD_EXAMPLES=ON
-DLLGL_BUILD_TESTS=ON
-DLLGL_BUILD_WRAPPER_C99=ON
-DLLGL_BUILD_WRAPPER_CSHARP=ON
-DLLGL_VK_ENABLE_SPIRV_REFLECT=ON
"-DLLGL_D3D11_ENABLE_FEATURELEVEL=${{ matrix.generator == 'Visual Studio 17 2022' && 'Direct3D 11.3' || 'Direct3D 11.0' }}"
"-DLLGL_D3D12_ENABLE_FEATURELEVEL=${{ matrix.generator == 'Visual Studio 17 2022' && 'Direct3D 12.2' || 'Direct3D 12.0' }}"
- name: Build
run: |
cmake --build ${{ github.workspace }}/${{ matrix.arch }} --config ${{ env.CONFIG }}
echo "LLGL built with ${{ matrix.generator }} for ${{ matrix.arch }} on $(date)." > ${{ env.README }}
echo "Place at root of LLGL repository to run examples and testbed." >> ${{ env.README }}
- name: Upload Binaries
uses: actions/upload-artifact@v4
if: matrix.generator == 'Visual Studio 17 2022' && matrix.lib == 'Shared' && matrix.config == 'Release'
with:
name: LLGL-Windows-${{ matrix.config }}-${{ matrix.arch == 'x64' && 'x86_64' || 'x86' }}
path: |
${{ env.README }}
${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/LLGL*.dll
${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/Example_*.exe
${{ github.workspace }}/${{ matrix.arch }}/build/${{ matrix.config }}/Testbed*.exe
- name: Testbed
working-directory: tests/Testbed
run: |
${{ github.workspace }}/${{ matrix.arch }}/build/${{ env.CONFIG }}/${{ matrix.config == 'Debug' && 'TestbedD' || 'Testbed' }}.exe d3d12 -v -f -t -g ${{ matrix.config == 'Debug' && '-d=gpu' || '' }}
- name: Upload Test Report
uses: actions/upload-artifact@v4
if: always() && matrix.generator == 'Visual Studio 17 2022' && matrix.arch == 'x64' && matrix.lib == 'Shared' && matrix.config == 'Release'
with:
name: LLGL-Win64-Test_Report
path: |
tests/Testbed/Output/Direct3D12/*.png
tests/Testbed/Output/Direct3D12/Report.txt