Skip to content

Commit 763f0b6

Browse files
authored
add dpdk action (#1166)
FIX: * move DPDK install steps to action * replace DPDK install steps in workflows
1 parent 92a2ebd commit 763f0b6

File tree

6 files changed

+60
-34
lines changed

6 files changed

+60
-34
lines changed

.github/actions/dpdk/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: intal dpdk from source
2+
3+
inputs:
4+
version:
5+
required: true
6+
type: string
7+
shell:
8+
required: false
9+
type: string
10+
default: 'bash'
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: checkout dpdk repo
15+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
with:
17+
repository: 'DPDK/dpdk'
18+
ref: "v${{ inputs.version }}"
19+
path: dpdk
20+
21+
- name: Build DPDK from source
22+
working-directory: dpdk
23+
shell: ${{ inputs.shell }}
24+
run: |
25+
meson build
26+
ninja -C build
27+
cd build
28+
sudo ninja install

.github/workflows/afxdp_build.yml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,26 +59,18 @@ jobs:
5959
source: '.'
6060
extensions: 'hpp,h,cpp,c,cc'
6161

62-
- name: checkout dpdk repo
63-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
64-
with:
65-
repository: 'DPDK/dpdk'
66-
ref: v${{ env.DPDK_VERSION }}
67-
path: dpdk
6862
- name: Install the build dependency
6963
run: |
7064
apt-get update -y
7165
apt-get install -y sudo git gcc meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev
7266
apt-get install -y make m4 clang llvm zlib1g-dev libelf-dev libcap-ng-dev gcc-multilib
7367
apt-get install -y systemtap-sdt-dev
7468
75-
- name: Build DPDK from source
76-
working-directory: dpdk
77-
run: |
78-
meson build
79-
ninja -C build
80-
cd build
81-
sudo ninja install
69+
- name: Install DPDK
70+
uses: ./.github/actions/dpdk
71+
with:
72+
version: ${{ env.DPDK_VERSION }}
73+
8274

8375
- name: Checkout xdp-tools
8476
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

.github/workflows/base_build.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,18 @@ jobs:
5454
clangFormatVersion: '14'
5555
source: '.'
5656
extensions: 'hpp,h,cpp,c,cc'
57-
58-
- name: checkout dpdk repo
59-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
60-
with:
61-
repository: 'DPDK/dpdk'
62-
ref: v${{ env.DPDK_VERSION }}
63-
path: dpdk
64-
6557
- name: Install the build dependency
6658
run: |
6759
apt-get update -y
6860
apt-get install -y sudo git gcc meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev systemtap-sdt-dev llvm clang
6961
apt-get install -y doxygen
7062
apt-get install -y make m4 clang llvm zlib1g-dev libelf-dev libcap-ng-dev libcap2-bin gcc-multilib
7163
72-
- name: Build DPDK from source
73-
working-directory: dpdk
74-
run: |
75-
meson build
76-
ninja -C build
77-
cd build
78-
sudo ninja install
64+
- name: install DPDK
65+
uses: ./.github/actions/dpdk
66+
with:
67+
version: ${{ env.DPDK_VERSION }}
68+
7969
- name: Git config
8070
working-directory: "${{ github.workspace }}"
8171
run: |

.github/workflows/centos_build.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414

1515
permissions:
1616
contents: read
17-
17+
env:
18+
DPDK_VERSION: 25.03
1819
jobs:
1920
changes:
2021
runs-on: ubuntu-latest
@@ -62,9 +63,13 @@ jobs:
6263
dnf config-manager --set-enabled powertools
6364
yum install -y epel-release
6465
yum install -y sudo git gcc gcc-c++ meson python3 python3-pyelftools pkg-config json-c-devel libpcap-devel gtest-devel SDL2-devel openssl-devel numactl-devel libasan
65-
yum install -y dpdk-devel
6666
yum install -y systemtap-sdt-devel clang llvm-devel
6767
68+
- name: Install DPDK
69+
uses: ./.github/actions/dpdk
70+
with:
71+
version: ${{ env.DPDK_VERSION }}
72+
6873
- name: Git config
6974
run: |
7075
git config --global user.email "you@example.com"

.github/workflows/ecosystem.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414

1515
permissions:
1616
contents: read
17-
17+
env:
18+
DPDK_VERSION: 25.03
1819
jobs:
1920
changes:
2021
runs-on: 'ubuntu-22.04'
@@ -51,9 +52,14 @@ jobs:
5152
run: |
5253
sudo apt-get update --fix-missing -y
5354
sudo apt-get install --no-install-recommends -y sudo git gcc gcc-multilib meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev llvm clang
54-
sudo apt-get install --no-install-recommends -y dpdk-dev systemtap-sdt-dev software-properties-common
55+
sudo apt-get install --no-install-recommends -y systemtap-sdt-dev software-properties-common
5556
sudo apt-get install --no-install-recommends -y libobs-dev swig
5657
58+
- name: Install DPDK
59+
uses: ./.github/actions/dpdk
60+
with:
61+
version: ${{ env.DPDK_VERSION }}
62+
5763
- name: Git config
5864
run: |
5965
git config --global user.email "you@example.com"

.github/workflows/ffmpeg_plugin.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ on:
1414

1515
permissions:
1616
contents: read
17-
17+
env:
18+
DPDK_VERSION: 25.03
1819
jobs:
1920
changes:
2021
runs-on: ubuntu-latest
@@ -79,12 +80,16 @@ jobs:
7980
run: |
8081
apt-get update -y
8182
apt-get install -y sudo git gcc meson python3 python3-pyelftools pkg-config libnuma-dev libjson-c-dev libpcap-dev libgtest-dev libsdl2-dev libsdl2-ttf-dev libssl-dev
82-
apt-get install -y dpdk-dev
8383
apt-get install -y nasm yasm
8484
apt-get install -y libavcodec-dev
8585
apt-get install -y make m4 clang llvm zlib1g-dev libelf-dev libcap-ng-dev gcc-multilib
8686
apt-get install -y systemtap-sdt-dev
8787
88+
- name: Install DPDK
89+
uses: ./.github/actions/dpdk
90+
with:
91+
version: ${{ env.DPDK_VERSION }}
92+
8893
- name: Build
8994
run: |
9095
./build.sh

0 commit comments

Comments
 (0)