Skip to content

Commit e06a49d

Browse files
authored
Improve indication for skipped DPDK CI tests. (#1935)
* Update dpdk CI workflow to utilize github env. * Pull debug cpu flags into the debug log of avx-512 check.
1 parent aaaaa4a commit e06a49d

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/build_and_test.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,15 @@ jobs:
256256
- image: ubuntu2204-dpdk2211
257257

258258
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+
259268
- name: Checkout code
260269
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
261270

@@ -274,18 +283,21 @@ jobs:
274283
- name: Build PcapPlusPlus
275284
run: cmake --build "$BUILD_DIR" -j
276285

277-
- name: Check AVX
278-
run: grep avx /proc/cpuinfo
279-
280286
- name: Test Packet++
287+
if: env.avx512 == 'true'
281288
run: |
282289
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
284291
285292
- name: Test Pcap++
293+
if: env.avx512 == 'true'
286294
run: |
287295
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"
289301

290302
- name: Check installation
291303
run: |

0 commit comments

Comments
 (0)