-
-
Notifications
You must be signed in to change notification settings - Fork 2
79 lines (76 loc) · 2.54 KB
/
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
76
77
78
79
name: windows
on: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ !(startsWith(github.ref, 'release/') || github.ref == 'develop')}}
jobs:
build:
strategy:
fail-fast: false
matrix:
target: [windows]
graphics: [vulkan, all]
arch: [x86, x86_64]
include:
- benchmarks: OFF
- graphics: all
benchmarks: ON
- arch: x86
bitconfig: 32
- arch: x86_64
bitconfig: 64
name: build
runs-on: windows-2022
steps:
- uses: actions/checkout@v1
with:
submodules: recursive
- uses: SimenB/github-actions-cpu-cores@v1
id: cpu-cores
- name: setup dependencies
uses: actions/setup-python@v4
with:
python-version: '3.7'
- name: initialize
run: |
python3 tools/generate_project_info.py
# todo: DCMAKE_CXX_FLAGS here is a workaround for an issue in the CI runner, which should be rechecked in a couple of weeks or so.
# see https://github.com/actions/runner-images/issues/10004
cmake --preset=windows-${{ matrix.bitconfig }}-release-${{ matrix.graphics }} -DPE_BENCHMARKS=${{ matrix.benchmarks }} -DCMAKE_CXX_FLAGS="/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR"
python3 tools/patch.py --project ./project_files/${{ matrix.arch }}/
- name: compile
run: cmake --build --preset=windows-${{ matrix.bitconfig }}-release-${{ matrix.graphics }} -j ${{ steps.cpu-cores.outputs.count }}
- name: test
run: |
cd builds/windows/${{ matrix.arch }}/release/bin
.\tests.exe --formatter compact --no-source
- name: finalize
if: ${{ matrix.benchmarks == 'ON' }}
uses: actions/upload-artifact@v3
with:
name: windows-${{ matrix.graphics }}-bin
path: builds/windows/${{ matrix.arch }}/release/bin/benchmarks.exe
if-no-files-found: error
retention-days: 1
benchmark:
strategy:
fail-fast: false
matrix:
graphics: [ all ]
name: benchmark
needs: build
runs-on: windows-2022
steps:
- name: setup
id: download
uses: actions/download-artifact@v3
with:
name: windows-${{ matrix.graphics }}-bin
- name: benchmark
run: .\benchmarks.exe --benchmark_out_format=json --benchmark_out=results.json
- name: finalize
uses: actions/upload-artifact@v3
with:
name: windows-${{ matrix.graphics }}
path: results.json
if-no-files-found: error