Skip to content

Refactor GitHub Action to build and test the BESS image #16

Refactor GitHub Action to build and test the BESS image

Refactor GitHub Action to build and test the BESS image #16

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2022-Present Intel Corporation
name: Build and Test
on:
pull_request:
branches:
- master
push:
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Setup environment
run: |
wget https://raw.githubusercontent.com/DPDK/dpdk/main/usertools/dpdk-hugepages.py -O dpdk-hugepages.py
chmod +x dpdk-hugepages.py
sudo mkdir -p /dev/hugepages
sudo ./dpdk-hugepages.py -p 1G --setup 8G
- name: Setup dependencies
run: |
sudo apt-get install -y ccache libbpf0
sudo pip3 install -r requirements.txt
yes n | ./env/rebuild_images.py focal64
sudo mkdir -p /mnt/huge
sudo mount -t hugetlbfs nodev /mnt/huge
export CXX="ccache $VER_CXX"
ccache -s
- name: Build BESS
run: |
sudo ./container_build.py bess
sudo ./container_build.py kmod_buildtest
- name: Test BESS
run: |
(cd core && ./all_test --gtest_shuffle)
coverage run -m unittest discover -v
python3 bessctl/run_module_tests.py
sudo python3 bessctl/run_module_tests.py --test_dir bessctl/module_tests/cndp
ccache -s
bessctl/bessctl daemon stop
[[ ${COVERAGE:-0} == 0 ]] || { sleep 3; codecov --gcov-exec gcov-7; }