-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor GitHub Action to build and test the BESS image #47
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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 | ||
thakurajayL marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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; } |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
scapy | ||
flask | ||
coverage | ||
grpcio | ||
protobuf==3.20 | ||
pyroute2 | ||
scapy |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this old ubuntu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am using this version because of the version that is being currently used in BESS. I have a couple more PRs coming after this one is merged about updating dependencies and I was planning to align the Ubuntu versions in the PR where I refactor the Dockerfile