-
Notifications
You must be signed in to change notification settings - Fork 59
125 lines (106 loc) · 3.87 KB
/
afxdp_build_with_gtest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
name: afxdp_gtest
on:
# allow manually trigger
workflow_dispatch:
push:
branches:
- main
- 'maint-**'
pull_request:
branches:
- main
- 'maint-**'
concurrency:
group: afxdp-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
# Customize the env if
BUILD_TYPE: Release
DPDK_VERSION: 23.11
MTL_BUILD_DISABLE_USDT: true
permissions:
contents: read
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
changed: ${{ steps.filter.outputs.afxdp_test == 'true' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v2
id: filter
with:
filters: .github/path_filters.yml
Build:
needs: changes
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }}
runs-on: [Linux, self-hosted, XDP]
timeout-minutes: 60
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Checkout IMTL
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Checkout DPDK
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
with:
repository: 'DPDK/dpdk'
ref: v${{ env.DPDK_VERSION }}
path: dpdk
- name: Install the build dependency
run: |
sudo pacman -Syu --noconfirm --needed git gcc meson python python-pyelftools pkg-config json-c libpcap gtest openssl numactl
- name: Apply dpdk patches
run: |
cd dpdk
git am ../patches/dpdk/${{ env.DPDK_VERSION }}/*.patch
- name: Build dpdk
run: |
cd dpdk
meson setup build -Ddisable_libs='bpf' -Ddisable_drivers='net/af_xdp'
ninja -C build
cd build
sudo ninja install
- name: Build
run: |
./build.sh
sudo ldconfig
Test:
needs: [changes, Build]
if: ${{ github.repository == 'OpenVisualCloud/Media-Transport-Library' && needs.changes.outputs.changed == 'true' }}
runs-on: [Linux, self-hosted, XDP]
env:
LD_LIBRARY_PATH: /usr/local/lib:/usr/lib64
TEST_PORT_P: native_af_xdp:enp7s0np0
TEST_PORT_R: native_af_xdp:enp8s0np0
INTERFACE_P: enp7s0np0
INTERFACE_R: enp8s0np0
steps:
- name: Harden Runner
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
with:
egress-policy: audit
- name: Kill previous gtest routine
run: |
sudo killall -SIGINT KahawaiTest || true
sudo killall -SIGINT KahawaiUfdTest || true
sudo killall -SIGINT KahawaiUplTest || true
sudo killall -SIGINT MtlManager || true
- name: Setup network interfaces
run: |
sudo ifconfig ${{ env.INTERFACE_P }} 192.167.97.10/24
sudo ifconfig ${{ env.INTERFACE_R }} 192.167.97.11/24
echo 2 | sudo tee /sys/class/net/${{ env.INTERFACE_P }}/napi_defer_hard_irqs
echo 200000 | sudo tee /sys/class/net/${{ env.INTERFACE_P }}/gro_flush_timeout
echo 2 | sudo tee /sys/class/net/${{ env.INTERFACE_R }}/napi_defer_hard_irqs
echo 200000 | sudo tee /sys/class/net/${{ env.INTERFACE_R }}/gro_flush_timeout
- name: Start MtlManager at background
run: |
sudo MtlManager &
- name: Run st2110 test case
run: |
sudo ./build/tests/KahawaiTest --auto_start_stop --mcast_only --p_port ${{ env.TEST_PORT_P }} --r_port ${{ env.TEST_PORT_R }} --pacing_way tsc --gtest_filter=St*:-St22_?x.*:*pacing*:*ext*:*create_free_max*:*detect*:*rtcp*:*4096_2160*