Repository navigation
196 lines (171 loc) · 8.54 KB
/
Copy pathtest.yaml
File metadata and controls
196 lines (171 loc) · 8.54 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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
on:
workflow_dispatch: # allow running the workflow manually
push:
branches:
- 'dev*'
tags:
- 'v*'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true # Cancel any in-progress runs of this workflow when a new run is triggered on the same ref (branch or tag)
name: Test
jobs:
build:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
tests: [basic,extra]
os: [windows-latest, macos-latest, ubuntu-latest, macos-14, macos-15-intel, ubuntu-22.04-arm, windows-11-arm]
exclude:
- os: macos-14
tests: extra
include:
- os: windows-latest
tests: mingw-ucrt64
steps:
# Checkout: https://github.com/actions/checkout
- name: Checkout repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
# Basic
- name: Debug
if: matrix.tests == 'basic'
run: |
cmake . -B out/debug -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug --parallel 4 --config Debug
ctest --test-dir out/debug --verbose --timeout 240 -C Debug
- name: Release
if: matrix.tests == 'basic'
run: |
cmake . -B out/release -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release --parallel 4 --config Release
ctest --test-dir out/release --verbose --timeout 240 -C Release
- name: Secure
if: matrix.tests == 'basic'
run: |
cmake . -B out/secure -DCMAKE_BUILD_TYPE=Release -DMI_SECURE=ON
cmake --build out/secure --parallel 4 --config Release
ctest --test-dir out/secure --verbose --timeout 240 -C Release
# Basic, C++
- name: Debug, C++
if: matrix.tests == 'basic' && runner.os != 'Windows' # windows already uses C++ by default
run: |
cmake . -B out/debug-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
cmake --build out/debug-cxx --parallel 8 --config Debug
ctest --test-dir out/debug-cxx --verbose --timeout 240 -C Debug
- name: Release, C++
if: matrix.tests == 'basic' && runner.os != 'Windows' # windows already uses C++ by default
run: |
cmake . -B out/release-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON
cmake --build out/release-cxx --parallel 8 --config Release
ctest --test-dir out/release-cxx --verbose --timeout 240 -C Release
# Extra, Windows x86
- name: Debug, Win32
if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm')
run: |
cmake . -B out/debug-x86 -DCMAKE_BUILD_TYPE=Debug -A Win32
cmake --build out/debug-x86 --parallel 4 --config Debug
ctest --test-dir out/debug-x86 --verbose --timeout 240 -C Debug
- name: Release, Win32
if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm')
run: |
cmake . -B out/release-x86 -DCMAKE_BUILD_TYPE=Release -A Win32
cmake --build out/release-x86 --parallel 4 --config Release
ctest --test-dir out/release-x86 --verbose --timeout 240 -C Release
- name: Debug, clang-cl
if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm')
run: |
cmake . -B out/debug-clang -DCMAKE_BUILD_TYPE=Debug -A Win32 -T ClangCl
cmake --build out/debug-clang --parallel 4 --config Debug
ctest --test-dir out/debug-clang --verbose --timeout 240 -C Debug
- name: Release, clang-cl
if: matrix.tests == 'extra' && runner.os == 'Windows' && !endsWith(matrix.os,'arm')
run: |
cmake . -B out/release-clang -DCMAKE_BUILD_TYPE=Release -A Win32 -T ClangCl
cmake --build out/release-clang --parallel 4 --config Release
ctest --test-dir out/release-clang --verbose --timeout 240 -C Release
# Extra
- name: Release, SIMD
if: matrix.tests == 'extra'
run: |
cmake . -B out/release-simd -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON
cmake --build out/release-simd --parallel 8 --config Release
ctest --test-dir out/release-simd --verbose --timeout 240 -C Release
- name: Release, C++, SIMD
if: matrix.tests == 'basic' && runner.os != 'Windows' && runner.os != 'macOS'
run: |
cmake . -B out/release-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_OPT_SIMD=ON -DMI_USE_CXX=ON
cmake --build out/release-cxx --parallel 8 --config Release
ctest --test-dir out/release-cxx --verbose --timeout 240 -C Release
- name: Debug, C++, clang++
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/debug-clang-cxx -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_USE_CXX=ON
cmake --build out/debug-clang-cxx --parallel 8 --config Debug
ctest --test-dir out/debug-clang-cxx --verbose --timeout 240 -C Debug
- name: Release, C++, clang++
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/release-clang-cxx -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_USE_CXX=ON
cmake --build out/release-clang-cxx --parallel 8 --config Release
ctest --test-dir out/release-clang-cxx --verbose --timeout 240 -C Release
- name: Debug, ASAN
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/debug-asan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_TRACK_ASAN=ON
cmake --build out/debug-asan --parallel 8 --config Debug
ctest --test-dir out/debug-asan --verbose --timeout 240 -C Debug
- name: Debug, UBSAN
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/debug-ubsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_DEBUG_UBSAN=ON
cmake --build out/debug-ubsan --parallel 8 --config Debug
ctest --test-dir out/debug-ubsan --verbose --timeout 240 -C Debug
- name: Debug, TSAN
if: matrix.tests == 'extra' && runner.os == 'Linux'
run: |
CC=clang CXX=clang++ cmake . -B out/debug-tsan -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_DEBUG_TSAN=ON
cmake --build out/debug-tsan --parallel 8 --config Debug
ctest --test-dir out/debug-tsan --verbose --timeout 240 -C Debug
- name: Debug, Guarded
if: matrix.tests == 'extra' && runner.os != 'macOS'
run: |
cmake . -B out/debug-guarded -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON -DMI_GUARDED=ON
cmake --build out/debug-guarded --parallel 8 --config Debug
ctest --test-dir out/debug-guarded --verbose --timeout 240 -C Debug
env:
MIMALLOC_GUARDED_SAMPLE_RATE: 100
- name: Release, Guarded
if: matrix.tests == 'extra' && runner.os == 'Linux' && startsWith(github.ref_name,'dev3')
run: |
cmake . -B out/release-guarded -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON -DMI_GUARDED=ON
cmake --build out/release-guarded --parallel 8 --config Release
ctest --test-dir out/release-guarded --verbose --timeout 240 -C Release
env:
MIMALLOC_GUARDED_SAMPLE_RATE: 100
# MSYS2 mingw64 UCRT64
- name: mingw-ucrt64 x64, Setup
if: matrix.tests == 'mingw-ucrt64'
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
with:
msystem: UCRT64
install: |
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-git
mingw-w64-ucrt-x86_64-make
mingw-w64-ucrt-x86_64-cmake
- name: mingw-ucrt64 x64, Debug
if: matrix.tests == 'mingw-ucrt64'
shell: msys2 {0}
run: |
env
cmake . -B out/debug-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Debug -DMI_DEBUG_FULL=ON
cmake --build out/debug-mingw-ucrt64-x64 --parallel 4 --config Debug
ctest --test-dir out/debug-mingw-ucrt64-x64 --verbose --timeout 240 -C Debug
- name: mingw-ucrt64 x64, Release
if: matrix.tests == 'mingw-ucrt64'
shell: msys2 {0}
run: |
cmake . -B out/release-mingw-ucrt64-x64 -DCMAKE_BUILD_TYPE=Release -DMI_OPT_ARCH=ON
cmake --build out/release-mingw-ucrt64-x64 --parallel 4 --config Release
ctest --test-dir out/release-mingw-ucrt64-x64 --verbose --timeout 240 -C Release