Skip to content

Commit 9ed6220

Browse files
cn10k action test
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
1 parent e2e546a commit 9ed6220

File tree

2 files changed

+94
-291
lines changed

2 files changed

+94
-291
lines changed

.github/workflows/build-cn10k.yml

+94
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: build-cn10k
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: '0 0 * * 1'
7+
8+
jobs:
9+
ubuntu-cn10k-build:
10+
name: ubuntu-cn10k-arm64
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
include:
17+
- arch: aarch64
18+
distro: ubuntu22.04
19+
compiler: gcc
20+
library: static
21+
22+
steps:
23+
- name: Checkout sources
24+
uses: actions/checkout@v4
25+
- name: Generate cache keys
26+
id: get_ref_keys
27+
run: |
28+
echo 'ccache=ccache-${{ matrix.distro }}-${{ matrix.compiler }}-${{ matrix.arch }}-'$(date -u +%Y-w%W) >> $GITHUB_OUTPUT
29+
- name: Retrieve ccache cache
30+
uses: actions/cache@v4
31+
with:
32+
path: ~/.ccache
33+
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
34+
restore-keys: |
35+
${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main
36+
- uses: uraimo/run-on-arch-action@v2.7.2
37+
name: Build DPDK
38+
id: build
39+
with:
40+
arch: ${{ matrix.arch }}
41+
distro: ${{ matrix.distro }}
42+
githubToken: ${{ github.token }}
43+
setup: |
44+
mkdir -p "${PWD}/artifacts"
45+
mkdir -p ~/.ccache
46+
dockerRunArgs: |
47+
--volume "${PWD}/artifacts:/artifacts"
48+
--volume "${HOME}/.ccache:/root/.ccache"
49+
shell: /bin/bash
50+
install: |
51+
apt-get update -q -y
52+
apt-get install -y ccache libarchive-dev libbsd-dev libbpf-dev
53+
apt-get install -y libfdt-dev libjansson-dev
54+
apt-get install -y libpcap-dev libssl-dev ninja-build pkg-config python3-pip
55+
apt-get install -y python3-pyelftools python3-setuptools python3-wheel zlib1g-dev meson gcc
56+
apt-get install -y build-essential ccache
57+
run: |
58+
export CC='ccache gcc'
59+
ccache -p
60+
meson build -Dplatform=cn10k --prefix="${PWD}/install"
61+
ninja install -C build
62+
sed -i '/prefix=/d' "${PWD}/install/lib/aarch64-linux-gnu/pkgconfig/libdpdk.pc"
63+
sed -i '/prefix=/d' "${PWD}/install/lib/aarch64-linux-gnu/pkgconfig/libdpdk-libs.pc"
64+
PKG_VERSION_NAME=`grep "Version:" "${PWD}/install/lib/aarch64-linux-gnu/pkgconfig/libdpdk.pc" | \
65+
awk -F':' '{print $2}' | tr -d ' ' | awk -F'.' '{print $1"."$2}'`
66+
mkdir -p "${PWD}/install/debian"
67+
mkdir -p "${PWD}/install/DEBIAN"
68+
cd "${PWD}/install"
69+
echo 'Source: dpdk' > debian/control
70+
echo 'Package: dpdk-'$PKG_VERSION_NAME'-cn10k' >> DEBIAN/control
71+
echo 'Version: '$PKG_VERSION_NAME >> DEBIAN/control
72+
echo "Depends: `dpkg-shlibdeps -O bin/dpdk-testpmd | awk -F'Depends=' '{print $2}'`" >> DEBIAN/control
73+
echo "Maintainer: Jerin Jacob (jerinj@marvell.com)" >> DEBIAN/control
74+
echo "Architecture: arm64" >> DEBIAN/control
75+
echo "Homepage: https://www.dpdk.org/" >> DEBIAN/control
76+
echo "Description: DPDK Library for Marvell Octeon 10" >> DEBIAN/control
77+
cd -
78+
mv "${PWD}/install" "${PWD}/dpdk-${PKG_VERSION_NAME}-cn10k_arm64"
79+
dpkg --build "dpdk-${PKG_VERSION_NAME}-cn10k_arm64"
80+
cp "dpdk-${PKG_VERSION_NAME}-cn10k_arm64.deb" /artifacts/.
81+
echo "PKG_VERSION_NAME=${PKG_VERSION_NAME}" > /artifacts/env
82+
- name: List artifacts
83+
id: artifacts
84+
run: |
85+
source "${PWD}/artifacts/env"
86+
echo $PKG_VERSION_NAME
87+
echo "PKG_VERSION_NAME=${PKG_VERSION_NAME}" >> "$GITHUB_OUTPUT"
88+
- name: Upload a Build Artifact
89+
uses: actions/upload-artifact@v4.3.1
90+
env:
91+
PKG_VERSION_NAME: ${{ steps.artifacts.outputs.PKG_VERSION_NAME }}
92+
with:
93+
name: dpdk-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k_arm64.deb
94+
path: ${{ github.workspace }}/artifacts/dpdk-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k_arm64.deb

.github/workflows/build.yml

-291
This file was deleted.

0 commit comments

Comments
 (0)