Skip to content

Add support for DPDK 24.11 #239

Add support for DPDK 24.11

Add support for DPDK 24.11 #239

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
fail-fast: false
matrix:
dpdk_version:
- "20.11"
- "23.11"
- "24.11"
env:
DPDK_VERSION: ${{ matrix.dpdk_version }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Rust stable
uses: actions-rs/toolchain@v1
with:
toolchain: 1.84.0
override: true
components: rustfmt, clippy
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: 3.11
- name: Install pip
run: |
python -m pip install --upgrade pip
- name: Install pyelftools
run: |
pip3 install pyelftools
- name: Install apt dependencies (Linux)
run: |
sudo apt-get update
sudo apt-get install libpcap-dev libnuma-dev
- name: Cache DPDK
id: cache-dpdk
uses: actions/cache@v2
with:
path: dpdk-${{ matrix.dpdk_version }}
key: ${{ runner.os }}-${{ matrix.dpdk_version }}
- name: Retrive or compile DPDK
if: steps.cache-dpdk.outputs.cache-hit != 'true'
run: |
echo "Compiling DPDK..." ;
if [ ! -e "dpdk-$DPDK_VERSION" ] || ! pkg-config --exists libdpdk ; then
wget http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.gz &&
tar -zxf dpdk-$DPDK_VERSION.tar.gz &&
cd dpdk-$DPDK_VERSION &&
pip3 install meson ninja &&
meson -Dprefix=$(pwd)/install/ build &&
cd build &&
ninja &&
ninja install &&
cd .. &&
cd .. ;
fi
- name: Export enviroment variables
run: |
echo "PKG_CONFIG_PATH=$(pwd)/dpdk-$DPDK_VERSION/install/lib/x86_64-linux-gnu/pkgconfig/" >> $GITHUB_ENV
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$(pwd)/dpdk-$DPDK_VERSION/install/lib/x86_64-linux-gnu/" >> $GITHUB_ENV
- name: Clippy retina-core (no mlx5)
run: cargo clippy --manifest-path core/Cargo.toml --no-default-features -- --deny warnings
- name: Unit test retina-core (no mlx5)
run: cargo test core --manifest-path core/Cargo.toml --no-default-features
- name: Clippy retina-core (with timing)
run: cargo clippy --manifest-path core/Cargo.toml --no-default-features --features timing
- name: Clippy retina-filtergen (no mlx5)
run: cargo clippy --manifest-path filtergen/Cargo.toml --no-default-features -- --deny warnings
format:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: cargo fmt
run: cargo fmt --all -- --check