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