File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -256,6 +256,15 @@ jobs:
256
256
- image : ubuntu2204-dpdk2211
257
257
258
258
steps :
259
+ - name : Check AVX-512 support
260
+ run : |
261
+ echo "::debug::$(grep flags /proc/cpuinfo)"
262
+ if grep -q avx512 /proc/cpuinfo; then
263
+ echo "avx512=true" >> $GITHUB_ENV
264
+ else
265
+ echo "avx512=false" >> $GITHUB_ENV
266
+ fi
267
+
259
268
- name : Checkout code
260
269
uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
261
270
@@ -274,18 +283,21 @@ jobs:
274
283
- name : Build PcapPlusPlus
275
284
run : cmake --build "$BUILD_DIR" -j
276
285
277
- - name : Check AVX
278
- run : grep avx /proc/cpuinfo
279
-
280
286
- name : Test Packet++
287
+ if : env.avx512 == 'true'
281
288
run : |
282
289
cd Tests/Packet++Test
283
- if [ -n "$(grep avx512 /proc/cpuinfo)" ]; then Bin/Packet++Test; else echo AVX-512 SUPPORT NOT FOUND, CANNOT RUN Packet++Test; fi
290
+ Bin/Packet++Test
284
291
285
292
- name : Test Pcap++
293
+ if : env.avx512 == 'true'
286
294
run : |
287
295
cd Tests/Pcap++Test
288
- if [ -n "$(grep avx512 /proc/cpuinfo)" ]; then Bin/Pcap++Test -n; else echo AVX-512 SUPPORT NOT FOUND, CANNOT RUN Pcap++Test; fi
296
+ Bin/Pcap++Test
297
+
298
+ - name : Tests skipped (no AVX-512 hardware support)
299
+ if : env.avx512 == 'false'
300
+ run : echo "Skipping tests since AVX-512 is not supported on the current runner"
289
301
290
302
- name : Check installation
291
303
run : |
You can’t perform that action at this time.
0 commit comments