p4rt performance test application #586
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: "Networking Recipe CI Pipeline" | |
on: | |
push: | |
branches: | |
- main | |
- ipdk_v* | |
pull_request: | |
branches: | |
- main | |
- ipdk_v* | |
concurrency: | |
# if workflow for PR or push is already running stop it, and start new one | |
group: build_and_test-${{ github.ref }} | |
cancel-in-progress: true | |
permissions: read-all | |
jobs: | |
build_and_stratum_ut_dpdk_target: | |
timeout-minutes: 100 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: 'Check Out p4-dpdk repo' | |
uses: actions/checkout@v3 | |
with: | |
repository: p4lang/p4-dpdk-target | |
submodules: 'recursive' | |
path: p4sde | |
- name: 'Install dependencies' | |
working-directory: ./p4sde/tools/setup | |
run: | | |
sudo apt update -y | |
sudo apt install python python3-setuptools python3-pip python3-wheel python3-cffi sudo libssl-dev git zip libatomic1 libnl-route-3-dev curl tree -y | |
pip3 install distro | |
python3 install_dep.py | |
cmake --version | |
sudo apt-get purge cmake | |
sudo rm -rf /usr/local/bin/cmake || true | |
sudo rm -rf ~/.local/bin/cmake || true | |
# removing cmake 3.25 and reinstalling 3.20, as build is failing with cmake 3.25 | |
wget https://cmake.org/files/v3.20/cmake-3.20.2-linux-x86_64.sh -O ${GITHUB_WORKSPACE}/cmake-3.20.2-linux-x86_64.sh | |
chmod a+x ${GITHUB_WORKSPACE}/cmake-3.20.2-linux-x86_64.sh | |
sudo mkdir -p /opt/rh/cmake | |
cd ${GITHUB_WORKSPACE} && sudo sh cmake-3.20.2-linux-x86_64.sh --prefix=/opt/rh/cmake --skip-license | |
sudo ln -s /opt/rh/cmake/bin/cmake /usr/local/bin/cmake | |
cmake --version | |
- name: 'Check Out Networking Recipe' | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
path: ipdk.recipe | |
- name: 'Compile P4 dpdk target' | |
run: | | |
export SDE=${GITHUB_WORKSPACE} | |
mkdir install deps | |
export SDE_INSTALL=${GITHUB_WORKSPACE}/install | |
cd ${GITHUB_WORKSPACE}/p4sde | |
./autogen.sh | |
./configure --prefix=$SDE_INSTALL | |
make -j6 | |
make install | |
- name: 'Build,Configure and Execute infrap4d dependencies' | |
run: | | |
cmake --version | |
cd ${GITHUB_WORKSPACE}/ipdk.recipe | |
export IPDK_RECIPE=`pwd` | |
cd $IPDK_RECIPE/setup | |
cmake -B build -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/deps | |
cmake --build build -j6 | |
- name: 'Install bazel and run Stratum unit tests' | |
run: | | |
cd /tmp | |
curl -o bazel-4.2.3-installer-linux-x86_64.sh https://github.com/bazelbuild/bazel/releases/download/4.2.3/bazel-4.2.3-installer-linux-x86_64.sh | |
chmod +x bazel-4.2.3-installer-linux-x86_64.sh | |
./bazel-4.2.3-installer-linux-x86_64.sh --user | |
export PATH="$PATH:$HOME/bin" | |
cd ${GITHUB_WORKSPACE}/ipdk.recipe/stratum/stratum | |
export DPDK_INSTALL=${GITHUB_WORKSPACE}/install | |
echo "DPDK" > ${GITHUB_WORKSPACE}/install/share/TARGET | |
xargs -a ${GITHUB_WORKSPACE}/ipdk.recipe/.github/dpdk-tests.txt bazel test --define target=dpdk | |
cd bazel-testlogs/stratum | |
zip stratum_ut_logs.zip `find . -name test.xml -print` | |
- name: 'Upload stratum-ut-result artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: stratum-ut-result | |
path: ipdk.recipe/stratum/stratum/bazel-testlogs/stratum/stratum_ut_logs.zip | |
- name: 'Execute dpdk target build' | |
run: | | |
cd ${GITHUB_WORKSPACE}/ipdk.recipe | |
export SDE_INSTALL=${GITHUB_WORKSPACE}/install | |
export DEPEND_INSTALL=${GITHUB_WORKSPACE}/deps | |
./make-all.sh --target=dpdk --prefix=${GITHUB_WORKSPACE}/dpdk-target | |
build_and_krnlmon_ut_dpdk_target: | |
timeout-minutes: 60 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: 'Check Out p4-dpdk repo' | |
uses: actions/checkout@v3 | |
with: | |
repository: p4lang/p4-dpdk-target | |
submodules: 'recursive' | |
path: p4sde | |
- name: 'Install dependencies' | |
working-directory: ./p4sde/tools/setup | |
run: | | |
sudo apt update -y | |
sudo apt install python python3-setuptools python3-pip python3-wheel python3-cffi sudo libssl-dev git zip libatomic1 libnl-route-3-dev curl tree -y | |
pip3 install distro | |
python3 install_dep.py | |
cmake --version | |
sudo apt-get purge cmake | |
sudo rm -rf /usr/local/bin/cmake || true | |
sudo rm -rf ~/.local/bin/cmake || true | |
# removing cmake 3.25 and reinstalling 3.20, as build is failing with cmake 3.25 | |
wget https://cmake.org/files/v3.20/cmake-3.20.2-linux-x86_64.sh -O ${GITHUB_WORKSPACE}/cmake-3.20.2-linux-x86_64.sh | |
chmod a+x ${GITHUB_WORKSPACE}/cmake-3.20.2-linux-x86_64.sh | |
sudo mkdir -p /opt/rh/cmake | |
cd ${GITHUB_WORKSPACE} && sudo sh cmake-3.20.2-linux-x86_64.sh --prefix=/opt/rh/cmake --skip-license | |
sudo ln -s /opt/rh/cmake/bin/cmake /usr/local/bin/cmake | |
cmake --version | |
- name: 'Check Out Networking Recipe' | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
path: ipdk.recipe | |
- name: 'Compile P4 dpdk target' | |
run: | | |
export SDE=${GITHUB_WORKSPACE} | |
mkdir install deps | |
export SDE_INSTALL=${GITHUB_WORKSPACE}/install | |
cd ${GITHUB_WORKSPACE}/p4sde | |
./autogen.sh | |
./configure --prefix=$SDE_INSTALL | |
make -j6 | |
make install | |
- name: 'Build,Configure and Execute infrap4d dependencies' | |
run: | | |
cmake --version | |
cd ${GITHUB_WORKSPACE}/ipdk.recipe | |
export IPDK_RECIPE=`pwd` | |
cd $IPDK_RECIPE/setup | |
cmake -B build -DCMAKE_INSTALL_PREFIX=${GITHUB_WORKSPACE}/deps | |
cmake --build build -j6 | |
- name: 'Run Krnlmon Unit Tests for DPDK Target' | |
run: | | |
cd ${GITHUB_WORKSPACE}/ipdk.recipe | |
export IPDK_RECIPE=${GITHUB_WORKSPACE}/ipdk.recipe | |
export SDE_INSTALL=${GITHUB_WORKSPACE}/install | |
export DEPEND_INSTALL=${GITHUB_WORKSPACE}/deps | |
cmake -B build -DDPDK_TARGET=on -DWITH_OVSP4RT=off | |
cmake --build build -j4 --target krnlmon-test || true | |
cat build/Testing/Temporary/LastTest.log | |
zip krnlmon_ut_logs.zip build/Testing/Temporary/LastTest.log | |
- name: 'Upload krnlmon-ut-result artifact' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: krnlmon_ut_logs | |
path: ipdk.recipe/krnlmon_ut_logs.zip | |
py_bandit_test: | |
timeout-minutes: 10 | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: 'Checkout Networking Recipe' | |
uses: actions/checkout@v3 | |
with: | |
path: ipdk.recipe | |
- name: 'Run Bandit Test' | |
uses: tj-actions/[email protected] | |
with: | |
targets: | # or a single string "." | |
./ipdk.recipe/clients/p4rt-ctl/p4rt-ctl.in | |
options: "-v" |