Skip to content

Commit

Permalink
Refactor GHA
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo committed Mar 7, 2024
1 parent d15174c commit 71e1d54
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 32 deletions.
66 changes: 37 additions & 29 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,47 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022-Present Intel Corporation

name: Build and Test process
name: Build and Test
on:
- pull_request
env:
BESS_DPDK_BRANCH: master
pull_request:
branches:
- master
push:

jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- 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

- 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: |
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: yes n | ./env/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; }'
(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; }
5 changes: 2 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
scapy
flask
coverage
grpcio
protobuf==3.20
pyroute2
scapy

0 comments on commit 71e1d54

Please sign in to comment.