-
Notifications
You must be signed in to change notification settings - Fork 1
142 lines (133 loc) · 3.56 KB
/
test.yaml
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
name: test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
test:
name: ${{matrix.config.name}}
runs-on: ${{matrix.config.image}}
strategy:
fail-fast: false
matrix:
config:
- {
name: linux-gcc,
image: ubuntu-20.04,
os: linux,
toolchain: unix,
cc: gcc-9,
fast: Off,
lto: Off,
}
- {
name: linux-clang,
image: ubuntu-20.04,
os: linux,
toolchain: unix,
cc: clang-10,
fast: Off,
lto: Off,
}
- {
name: windows-msvc,
image: windows-2019,
os: windows,
toolchain: msvc,
cc: cl,
fast: Off,
lto: Off,
}
- {
name: windows-clang,
image: windows-2019,
os: windows,
toolchain: msvc,
cc: clang,
fast: Off,
lto: Off,
}
- {
name: windows-mingw,
image: windows-2019,
os: windows,
toolchain: mingw,
cc: gcc,
fast: Off,
lto: Off,
}
- {
name: linux-clang-release,
image: ubuntu-20.04,
os: linux,
toolchain: unix,
cc: clang-10,
fast: On,
lto: On,
}
- {
name: windows-msvc-release,
image: windows-2019,
os: windows,
toolchain: msvc,
cc: cl,
fast: On,
lto: On,
}
env:
CC: ${{matrix.config.cc}}
CMAKE_OPTS: "-DEXTERNAL_ASSETS=Off -DSANITIZE=On -DFAST=${{matrix.config.fast}} -DLTO=${{matrix.config.lto}}"
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: prepare-ubuntu
if: matrix.config.os == 'linux'
uses: ./.github/actions/prepare-ubuntu
id: prepare-ubuntu
with:
dist: focal
- name: prepare-windows
if: matrix.config.os == 'windows'
uses: ./.github/actions/prepare-windows
id: prepare-windows
- name: test-unix
if: matrix.config.toolchain == 'unix'
run: |
cmake -B build $CMAKE_OPTS &&
cd build &&
make -k all test
- name: test-msvc
if: matrix.config.toolchain == 'msvc'
run: |
./ci/env-win32.ps1 &&
cmake -B build -G 'NMake Makefiles' $($env:CMAKE_OPTS -split ' ') &&
cd build &&
nmake /C /K all test
- name: test-mingw
if: matrix.config.toolchain == 'mingw'
run: |
cmake -B build -G 'MinGW Makefiles' $($env:CMAKE_OPTS -split ' ') &&
cd build &&
mingw32-make -k all test
- name: archive
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: archive-${{matrix.config.name}}
path: |
build/**/logs/*.crash
build/**/logs/*.eventtrace
build/**/logs/*.log
build/**/logs/*.mocha
- name: report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: test-results-${{matrix.config.name}}
fail-on-error: false
path: build/**/logs/*.mocha
reporter: mocha-json