@@ -36,56 +36,66 @@ jobs:
36
36
if : always()
37
37
run : cmake -P cmake/spell.cmake
38
38
39
- sanitize :
39
+ test-avx512 :
40
40
needs : [lint]
41
41
42
- runs-on : ubuntu-22.04
42
+ strategy :
43
+ matrix :
44
+ os : [ubuntu-22.04]
43
45
44
- env : { CXX: clang++-18 }
46
+ runs-on : ${{ matrix.os } }
45
47
46
48
steps :
47
49
- uses : actions/checkout@v4
48
50
49
- - name : Install Python
50
- uses : actions/setup-python@v5
51
- with : { python-version: "3.12" }
52
-
53
51
- name : Install LLVM 18
54
52
run : |
55
53
wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | sudo tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc
56
54
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main"
57
55
sudo apt update
58
56
sudo apt install llvm-18 llvm-18-dev llvm-18-tools clang-18 clang-tidy-18 clang-format-18 clang-tools-18 libclang-18-dev -y
59
57
58
+ - name : Install static analyzers
59
+ if : matrix.os == 'ubuntu-22.04'
60
+ run : >-
61
+ sudo apt-get install clang-tidy-18 cppcheck -y -q
62
+
63
+ sudo update-alternatives --install
64
+ /usr/bin/clang-tidy clang-tidy
65
+ /usr/bin/clang-tidy-18 140
66
+
60
67
- name : Conan cache
61
68
uses : actions/cache@v4
62
69
with :
63
- path : conan_cache_save.tgz
64
- key : conan-sanitize -${{ hashFiles('conan*.[pl][yo]*') }}
70
+ path : conan_cache_save-${{ matrix.os}} .tgz
71
+ key : conan-${{ matrix.os }} -${{ hashFiles('conan*.[pl][yo]*') }}
65
72
66
73
- name : Install dependencies
74
+ shell : bash
67
75
run : bash < .github/scripts/conan-ci-setup.sh
68
76
69
77
- name : Configure
70
- run : cmake --preset=ci-sanitize
78
+ shell : pwsh
79
+ run : |
80
+ $output = cmake -DENABLE_SIMD=ON "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
81
+ Write-Output $output
82
+ if ($output -match "AVX-512 is supported") {
83
+ Write-Output "AVX512 is enabled"
84
+ } else {
85
+ throw "AVX512 is not available"
86
+ }
71
87
72
88
- name : Build
73
- run : cmake --build build/sanitize -j 2
89
+ run : cmake --build build --config Release -j 4
90
+
91
+ - name : Install
92
+ run : cmake --install build --config Release --prefix prefix
74
93
75
94
- name : Test
76
- working-directory : build/sanitize
77
- env :
78
- ASAN_OPTIONS : " strict_string_checks=1:\
79
- detect_stack_use_after_return=1:\
80
- check_initialization_order=1:\
81
- strict_init_order=1:\
82
- detect_leaks=1:\
83
- halt_on_error=1"
84
- UBSAN_OPTIONS : " print_stacktrace=1:\
85
- halt_on_error=1"
86
- run : ctest --output-on-failure --no-tests=error -j 2
87
-
88
- test :
95
+ working-directory : build
96
+ run : ctest --output-on-failure --no-tests=error -C Release -j 2
97
+
98
+ test-nosimd :
89
99
needs : [lint]
90
100
91
101
strategy :
@@ -113,14 +123,77 @@ jobs:
113
123
/usr/bin/clang-tidy clang-tidy
114
124
/usr/bin/clang-tidy-18 140
115
125
126
+ - name : Conan cache
127
+ uses : actions/cache@v4
128
+ with :
129
+ path : conan_cache_save-${{ matrix.os}}.tgz
130
+ key : conan-${{ matrix.os }}-${{ hashFiles('conan*.[pl][yo]*') }}
131
+
132
+ - name : Install dependencies
133
+ shell : bash
134
+ run : bash < .github/scripts/conan-ci-setup.sh
135
+
136
+ - name : Configure
137
+ shell : pwsh
138
+ run : |
139
+ $output = cmake -DENABLE_SIMD=OFF "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
140
+ Write-Output $output
141
+ if ($output -match "SIMD is not supported by the compiler") {
142
+ Write-Output "SIMD is disabled"
143
+ } else {
144
+ throw "SIMD is enabled when it should not be"
145
+ }
146
+
147
+ - name : Build
148
+ run : cmake --build build --config Release -j 4
149
+
150
+ - name : Install
151
+ run : cmake --install build --config Release --prefix prefix
152
+
153
+ - name : Test
154
+ working-directory : build
155
+ run : ctest --output-on-failure --no-tests=error -C Release -j 2
156
+
157
+ test-neon :
158
+ needs : [lint]
159
+
160
+ strategy :
161
+ matrix :
162
+ os : [macos-14]
163
+
164
+ runs-on : ${{ matrix.os }}
165
+
166
+ env :
167
+ CC : /opt/homebrew/opt/llvm@18/bin/clang
168
+ CXX : /opt/homebrew/opt/llvm@18/bin/clang++
169
+ CLANG_DIR : ' /opt/homebrew/opt/llvm@18/bin/clang'
170
+ LLVM_DIR : ' /opt/homebrew/opt/llvm@18'
171
+
172
+ steps :
173
+ - uses : actions/checkout@v4
174
+
175
+ - name : Install LLVM 18
176
+ run : |
177
+ brew install llvm@18
178
+
179
+ - name : Verify Installation
180
+ run : |
181
+ ${{ env.CC }} --version
182
+ ${{ env.CXX }} --version
183
+
184
+ - name : Install static analyzers
185
+ if : matrix.os == 'macos-14'
186
+ run : >-
187
+ brew install cppcheck
188
+
116
189
- name : Install Python
117
190
uses : actions/setup-python@v5
118
191
with : { python-version: "3.12" }
119
192
120
193
- name : Conan cache
121
194
uses : actions/cache@v4
122
195
with :
123
- path : conan_cache_save.tgz
196
+ path : conan_cache_save-${{ matrix.os}} .tgz
124
197
key : conan-${{ matrix.os }}-${{ hashFiles('conan*.[pl][yo]*') }}
125
198
126
199
- name : Install dependencies
@@ -129,15 +202,21 @@ jobs:
129
202
130
203
- name : Configure
131
204
shell : pwsh
132
- run : cmake "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
205
+ run : |
206
+ $output = cmake -DENABLE_SIMD=OFF "--preset=ci-$("${{ matrix.os }}".split("-")[0])"
207
+ Write-Output $output
208
+ if ($output -match "ARM NEON is supported by the compiler") {
209
+ Write-Output "ARM NEON is enabled"
210
+ } else {
211
+ throw "ARM NEON is not available"
212
+ }
133
213
134
214
- name : Build
135
- run : cmake --build build --config Release -j 2
215
+ run : cmake --build build --config Release -j 4
136
216
137
217
- name : Install
138
218
run : cmake --install build --config Release --prefix prefix
139
219
140
220
- name : Test
141
221
working-directory : build
142
222
run : ctest --output-on-failure --no-tests=error -C Release -j 2
143
-
0 commit comments