Move encoding functions to ovsp4rt_encoders.cc #150
Workflow file for this run
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
name: "P4CP build checks" | |
on: | |
push: | |
branches: | |
- ffoulkes | |
- main | |
pull_request: | |
branches: | |
- ffoulkes | |
- main | |
concurrency: | |
# If workflow is currently running, stop it and start a new one. | |
group: pipeline-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
env: | |
#--------------------------------------------------------------------- | |
# Environment variables | |
#--------------------------------------------------------------------- | |
SDE_REPOSITORY: ipdk-io/p4dev.dpdk-sde | |
SDE_TAG: 2023.10.1 | |
SDE_FILENAME: dpdk-sde-dev-ubuntu-20.04.tar.gz | |
SDE_INSTALL_DIR: /opt/p4dev/dpdk-sde | |
DEPS_REPOSITORY: ipdk-io/stratum-deps | |
DEPS_TAG: v1.3.4 | |
DEPS_FILENAME: deps-ubuntu-1.3.4-x86_64.tar.gz | |
DEPS_INSTALL_DIR: /opt/p4dev/x86deps | |
PREREQS: libbsd-dev libnl-3-dev libnl-route-3-dev libnl-genl-3-dev | |
jobs: | |
#--------------------------------------------------------------------- | |
# dpdk_build_and_test | |
#--------------------------------------------------------------------- | |
dpdk_build_and_test: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Clone networking-recipe | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: recipe | |
- name: Install prerequisites | |
run: | | |
sudo apt install $PREREQS | |
- name: Install DPDK SDE | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: ${{ env.SDE_REPOSITORY }} | |
tag: ${{ env.SDE_TAG }} | |
fileName: ${{ env.SDE_FILENAME }} | |
- run: | | |
sudo tar -xzf $SDE_FILENAME -C / | |
rm $SDE_FILENAME | |
- name: Install stratum dependencies | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: ${{ env.DEPS_REPOSITORY }} | |
tag: ${{ env.DEPS_TAG }} | |
fileName: ${{ env.DEPS_FILENAME }} | |
- run: | | |
sudo tar -xzf $DEPS_FILENAME -C / | |
rm $DEPS_FILENAME | |
- name: Build networking-recipe | |
working-directory: recipe | |
run: | | |
export DEPEND_INSTALL=$DEPS_INSTALL_DIR | |
export SDE_INSTALL=$SDE_INSTALL_DIR | |
./make-all.sh --target=dpdk --rpath | |
- name: Run unit tests | |
working-directory: recipe/build | |
run: | | |
ctest --output-on-failure | |
#--------------------------------------------------------------------- | |
# ovsp4rt_build_and_test | |
#--------------------------------------------------------------------- | |
ovsp4rt_build_and_test: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 10 | |
steps: | |
- name: Clone networking-recipe | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
path: recipe | |
- name: Install prerequisites | |
run: | | |
sudo apt install $PREREQS | |
- name: Install DPDK SDE | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: ${{ env.SDE_REPOSITORY }} | |
tag: ${{ env.SDE_TAG }} | |
fileName: ${{ env.SDE_FILENAME }} | |
- run: | | |
sudo tar -xzf $SDE_FILENAME -C / | |
rm $SDE_FILENAME | |
- name: Install stratum dependencies | |
uses: robinraju/release-downloader@v1.11 | |
with: | |
repository: ${{ env.DEPS_REPOSITORY }} | |
tag: ${{ env.DEPS_TAG }} | |
fileName: ${{ env.DEPS_FILENAME }} | |
- run: | | |
sudo tar -xzf $DEPS_FILENAME -C / | |
rm $DEPS_FILENAME | |
- name: Build ovsp4rt | |
working-directory: recipe | |
run: | | |
export DEPEND_INSTALL=$DEPS_INSTALL_DIR | |
export SDE_INSTALL=$SDE_INSTALL_DIR | |
# Configure cmake | |
cmake -B build \ | |
-DTDI_TARGET=DPDK \ | |
-DP4OVS_MODE=OVSP4RT \ | |
-DBUILD_CLIENT=YES \ | |
-DBUILD_JOURNAL=YES | |
# Build ovsp4rt | |
cmake --build build -j6 \ | |
--target ovsp4rt ovsp4rt-unit-tests | |
- name: Run unit tests | |
working-directory: recipe/build | |
run: | | |
ctest -L ovsp4rt --output-on-failure |