Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 43 additions & 7 deletions .github/workflows/build-cn10k.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name: build-cn10k

on:
workflow_dispatch:
push:
tags:
- '[0-9][0-9].[0-9][0-9].0'
schedule:
- cron: "0 0 * * 1"

Expand All @@ -10,28 +13,61 @@ permissions:
id-token: write
packages: write

env:
COMPONENT: dpdk

jobs:
ubuntu-cn10k-build:
name: ubuntu-cn10k-arm64
runs-on: ubuntu-24.04-arm

steps:
- name: Checkout sources
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

- name: Generate cache keys
id: get_ref_keys
run: |
echo 'ccache=ccache-'$(date -u +%Y-m%M) >> $GITHUB_OUTPUT
echo 'ccache=ccache-'$(date -u +%Y-%m) >> $GITHUB_OUTPUT
- name: Retrieve ccache cache
uses: actions/cache@v4
uses: actions/cache@v4.2.3
with:
path: ~/.ccache
key: ${{ steps.get_ref_keys.outputs.ccache }}-${{ github.ref }}
restore-keys: |
${{ steps.get_ref_keys.outputs.ccache }}-refs/heads/main

- name: Extract version details
id: version
run: |
set -x
mkdir -p "${PWD}/artifacts"
git fetch --tags --quiet

EVENT="${{ github.event_name }}"

if [ "$EVENT" = "push" ]; then
PKG_POSTFIX=""
IS_DEVEL=false
else
PKG_POSTFIX="-devel"
IS_DEVEL=true
fi

{
echo "PKG_POSTFIX=${PKG_POSTFIX}"
echo "IS_DEVEL=${IS_DEVEL}"
echo "COMPONENT=${COMPONENT}"
} >> artifacts/env

- name: Build DPDK and generate package
id: build
run: |
mkdir -p "${PWD}/artifacts"
set -x
export DEBIAN_FRONTEND=noninteractive
source artifacts/env
mkdir -p ~/.ccache
sudo apt-get update -q -y
sudo apt-get install -y build-essential ccache git software-properties-common
Expand Down Expand Up @@ -88,21 +124,21 @@ jobs:
echo "DISTRO=${DISTRO}" >> "$GITHUB_OUTPUT"
- name: Upload debian package as artifact
uses: actions/upload-artifact@v4.3.1
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'workflow_dispatch' }}
with:
name: dpdk-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}_arm64.deb
path: ${{ github.workspace }}/artifacts/dpdk-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}-cn10k${{ steps.artifacts.outputs.PKG_POSTFIX }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}_arm64.deb
- name: Delete existing release
uses: liudonghua123/delete-release-action@v1
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'workflow_dispatch' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_name: dpdk-cn10k-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
suppress_errors: true
- name: Release DPDK cn10k package
uses: softprops/action-gh-release@v2.0.4
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' }} || ${{ github.event_name == 'workflow_dispatch' }}
with:
tag_name: dpdk-cn10k-${{ steps.artifacts.outputs.PKG_VERSION_NAME }}_${{ steps.artifacts.outputs.MRVL_PKG_VERSION }}-${{ steps.artifacts.outputs.DISTRO }}-${{ steps.artifacts.outputs.TAG }}
files: |
Expand Down