Skip to content

chore: Add FOSSA check to GH actions #96

chore: Add FOSSA check to GH actions

chore: Add FOSSA check to GH actions #96

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 Intel Corporation
name: Build and Test process
on:
- pull_request
jobs:
build:
runs-on: '${{ matrix.os }}'
strategy:
matrix:
os:
- ubuntu-20.04
env:
BESS_DPDK_BRANCH: "dpdk-2011-focal"
steps:
- uses: actions/checkout@v2
- run: sudo sysctl -w vm.nr_hugepages=512
- run: sudo apt-get update
- run: sudo apt-get install -y python3-pip python3-setuptools python3-coverage python3-pyelftools ccache
- run: sudo pip3 install -r requirements.txt
- run: '[[ ${COVERAGE:-0} == 0 ]] || sudo apt-get install -y gcc-7'
- run: '[[ ${SANITIZE:-0} == 0 ]] || sudo apt-get install -y llvm-3.9'
- name: Install CNDP packages
run: |
sudo apt-get update && sudo apt-get install -y \
build-essential libbsd-dev libelf-dev libbpf-dev libjson-c-dev \
libnl-3-dev libnl-cli-3-dev libnuma-dev libpcap-dev meson \
pkg-config libgflags2.2
- run: |
cd env
yes n | ./rebuild_images.py focal64
- run: sudo mkdir -p /mnt/huge
- run: sudo mount -t hugetlbfs nodev /mnt/huge
- run: export CXX="ccache $VER_CXX"
- run: ccache -s
- run: sudo ./container_build.py bess
- run: sudo ./container_build.py kmod_buildtest
- run: (cd core && ./all_test --gtest_shuffle)
- run: python3-coverage run -m unittest discover -v
- run: python3 bessctl/run_module_tests.py
- run: sudo python3 bessctl/run_module_tests.py --test_dir bessctl/module_tests/cndp
- run: ccache -s
- run: bessctl/bessctl daemon stop
- run: '[[ ${COVERAGE:-0} == 0 ]] || { sleep 3; codecov --gcov-exec gcov-7; }'