-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Ric Li <ming3.li@intel.com>
- Loading branch information
Showing
3 changed files
with
138 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
self-hosted-runner: | ||
labels: | ||
- DPDK | ||
- XDP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
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 | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
pull-requests: read | ||
outputs: | ||
changed: ${{ steps.filter.outputs.linux_gtest == 'true' }} | ||
steps: | ||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # 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@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 | ||
with: | ||
egress-policy: audit | ||
|
||
- name: Checkout IMTL | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Checkout DPDK | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
with: | ||
repository: 'DPDK/dpdk' | ||
ref: v${{ env.DPDK_VERSION }} | ||
path: dpdk | ||
|
||
- name: Install the build dependency | ||
run: | | ||
sudo apt-get install -y git gcc meson python3 python3-pip pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libssl-dev | ||
- name: Install the python package | ||
run: pip install pyelftools==0.29 ninja==1.11.1 | ||
|
||
- 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 | ||
env: | ||
PKG_CONFIG_PATH: /usr/local/lib/pkgconfig:/usr/lib64/pkgconfig | ||
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:enp24s0f0 | ||
TEST_PORT_R: native_af_xdp:enp24s0f1 | ||
INTERFACE_P: enp24s0f0 | ||
INTERFACE_R: enp24s0f1 | ||
steps: | ||
- name: Harden Runner | ||
uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.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 | ||
- name: Setup network interfaces | ||
run: | | ||
sudo nmcli dev set ${{ env.INTERFACE_P }} managed no | ||
sudo ifconfig ${{ env.INTERFACE_P }} 192.168.108.101/24 | ||
sudo nmcli dev set ${{ env.INTERFACE_R }} managed no | ||
sudo ifconfig ${{ env.INTERFACE_R }} 192.168.108.102/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: Run st2110 test case | ||
run: | | ||
sudo ./build/tests/KahawaiTest --auto_start_stop --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* | ||
- name: Run st2110 st20p test case in simulation ENA environment | ||
run: | | ||
sudo ./build/tests/KahawaiTest --auto_start_stop --p_port ${{ env.TEST_PORT_P }} --r_port ${{ env.TEST_PORT_R }} --rss_mode l3_l4 --pacing_way tsc --iova_mode pa --multi_src_port --gtest_filter=St20p*:-*pacing*:*ext*:*create_free_max*:*rtcp* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters