Skip to content

Commit 5f95ee0

Browse files
authored
FIX: gtest-bare-metal.yml workflow failing (#1091)
FIX: This PR introduce a qucik fix for failing tests regarding UnitTesting on baremetal and wrong checkout done on runner side. gtest-bare-metal.yml workflow failing REFACTOR: removed DPDK build for each bare metal run as it does not change often - this will be added later as an optional for workflow dispatch.
1 parent 0b6d41c commit 5f95ee0

File tree

1 file changed

+19
-29
lines changed

1 file changed

+19
-29
lines changed

.github/workflows/gtest-bare-metal.yml

Lines changed: 19 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
default: 'main'
1010
required: false
1111
description: 'Branch name to use'
12-
1312
push:
1413
branches:
1514
- main
@@ -20,14 +19,13 @@ on:
2019
- 'maint-**'
2120

2221
concurrency:
23-
group: ${{ github.head_ref || github.run_id }}
22+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
2423
cancel-in-progress: true
2524

2625
env:
2726
# Customize the env if
2827
BUILD_TYPE: 'Release'
2928
DPDK_VERSION: '23.11'
30-
DPDK_REBUILD: 'false'
3129
# Bellow ENV variables are required to be defined on runner side:
3230
# TEST_PF_PORT_P: '0000:49:00.0'
3331
# TEST_PF_PORT_R: '0000:49:00.1'
@@ -69,34 +67,18 @@ jobs:
6967
- name: Checkout MTL
7068
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7169
with:
72-
ref: '${{ inputs.branch-to-checkout || github.head_ref || github.ref }}'
73-
74-
- name: Checkout DPDK
75-
if: env.DPDK_REBUILD == 'true'
76-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
77-
with:
78-
repository: 'DPDK/dpdk'
79-
ref: 'v${{ env.DPDK_VERSION }}'
80-
path: 'dpdk'
70+
ref: '${{ inputs.branch-to-checkout || github.sha || github.ref }}'
8171

8272
- name: Install the build dependency
8373
run: |
84-
sudo apt-get install -y git gcc meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev
85-
sudo apt-get install -y systemtap-sdt-dev
86-
87-
- name: Apply dpdk patches
88-
if: env.DPDK_REBUILD == 'true'
89-
run: |
90-
patch -d "dpdk" -p1 -i <(cat patches/dpdk/${{ env.DPDK_VERSION }}/*.patch)
91-
92-
- name: Build dpdk
93-
if: env.DPDK_REBUILD == 'true'
94-
run: |
95-
cd dpdk
96-
meson build
97-
ninja -C build
98-
cd build
99-
sudo ninja install
74+
sudo apt-get install -y \
75+
git gcc meson \
76+
python3-dev \
77+
python3-pyelftools \
78+
libjson-c-dev libpcap-dev libgtest-dev \
79+
libsdl2-dev libsdl2-ttf-dev libssl-dev \
80+
pkg-config libnuma-dev \
81+
systemtap-sdt-dev
10082
10183
- name: Build
10284
run: |
@@ -122,7 +104,7 @@ jobs:
122104
123105
- name: Binding network adapter
124106
run: |
125-
sudo ./script/nicctl.sh create_vf "${TEST_PF_PORT_P}" || true
107+
sudo nicctl create_vf "${TEST_PF_PORT_P}" || true
126108
sudo dpdk-devbind.py -b vfio-pci "${TEST_DMA_PORT_P}" || true
127109
sudo dpdk-devbind.py -b vfio-pci "${TEST_DMA_PORT_R}" || true
128110
@@ -161,3 +143,11 @@ jobs:
161143
- name: Run st2110 st20p test case with kernel loopback
162144
run: |
163145
./build/tests/KahawaiTest --p_port kernel:lo --r_port kernel:lo --auto_start_stop --gtest_filter=St20p*
146+
147+
- name: Kill gtest routines that could have been left
148+
if: always()
149+
run: |
150+
sudo killall -SIGINT KahawaiTest || true
151+
sudo killall -SIGINT KahawaiUfdTest || true
152+
sudo killall -SIGINT KahawaiUplTest || true
153+
sudo killall -SIGINT MtlManager || true

0 commit comments

Comments
 (0)