forked from facebook/bpfilter
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ba13de
commit 05690b6
Showing
15 changed files
with
272 additions
and
198 deletions.
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,103 +1,32 @@ | ||
name: CI | ||
name: Testing on CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- "**" | ||
|
||
env: | ||
REGISTRY: ghcr.io | ||
IMAGE_NAME: ${{ github.repository }} | ||
|
||
permissions: | ||
checks: write | ||
pull-requests: write | ||
contents: read | ||
packages: write | ||
|
||
jobs: | ||
full: | ||
if: github.repository == 'facebook/bpfilter' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
system: ["fedora:41"] | ||
arch: ["X64", "ARM64"] | ||
mode: ["release", "debug"] | ||
container: "${{ matrix.system }}" | ||
runs-on: [self-hosted, "${{ matrix.arch }}"] | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies (Fedora) | ||
run: | | ||
sudo dnf --disablerepo=* --enablerepo=fedora,updates --setopt=install_weak_deps=False -y install \ | ||
bison bpftool clang clang-tools-extra cmake doxygen flex g++ git gcc jq lcov libasan libbpf-devel \ | ||
libcmocka-devel libnl3-devel libubsan pkgconf python3-breathe python3-furo python3-linuxdoc \ | ||
python3-sphinx | ||
- name: Configure build | ||
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=${{ matrix.mode }} | ||
- name: Build | ||
run: make -C $GITHUB_WORKSPACE/build | ||
- name: Run unit tests | ||
run: make -C $GITHUB_WORKSPACE/build test | ||
- name: Coverage | ||
run: make -C $GITHUB_WORKSPACE/build coverage | ||
- name: Upload coverage report to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: build/doc/lcov.out | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
- name: Check style | ||
run: make -C $GITHUB_WORKSPACE/build check | ||
- name: Generate documentation | ||
run: make -C $GITHUB_WORKSPACE/build doc | ||
|
||
build: | ||
if: github.repository == 'facebook/bpfilter' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
image: ["fedora:39", "fedora:40", "ubuntu:24.04"] | ||
arch: ["X64", "ARM64"] | ||
container: ${{ matrix.image }} | ||
runs-on: [self-hosted, "${{ matrix.arch }}"] | ||
tests: | ||
runs-on: ["4-core-ubuntu-arm"] | ||
container: | ||
image: ghcr.io/facebook/bpfilter:fedora-41-arm64 | ||
options: --privileged --pid=host -v /home/quentin/Projects/bpfilter:/bpfilter | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
- name: Install dependencies (Fedora) | ||
if: matrix.image == 'fedora:39' || matrix.image == 'fedora:40' | ||
run: | | ||
sudo dnf --disablerepo=* --enablerepo=fedora,updates --setopt=install_weak_deps=False -y install \ | ||
bison bpftool clang clang-tools-extra cmake doxygen flex g++ git gcc jq lcov libasan libbpf-devel \ | ||
libcmocka-devel libnl3-devel libubsan pkgconf python3-breathe python3-furo python3-linuxdoc \ | ||
python3-sphinx | ||
- name: Install dependencies (Ubuntu) | ||
if: matrix.image == 'ubuntu:24.04' | ||
run: | | ||
apt-get update | ||
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install \ | ||
bison \ | ||
clang \ | ||
clang-format \ | ||
clang-tidy \ | ||
cmake \ | ||
doxygen \ | ||
flex \ | ||
furo \ | ||
git \ | ||
jq \ | ||
lcov \ | ||
libbpf-dev \ | ||
libcmocka-dev \ | ||
libnl-3-dev \ | ||
linux-tools-common \ | ||
python3-breathe \ | ||
python3-pip \ | ||
python3-sphinx \ | ||
pkgconf && \ | ||
pip3 install --break-system-packages linuxdoc | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Mount bpffs | ||
run: mount bpffs -t bpf /sys/fs/bpf | ||
- name: Check | ||
run: uname -a | ||
- name: Configure build | ||
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build | ||
- name: Build | ||
run: make -C $GITHUB_WORKSPACE/build | ||
- name: Run unit tests | ||
run: make -C $GITHUB_WORKSPACE/build test | ||
run: cmake -S $GITHUB_WORKSPACE -B $GITHUB_WORKSPACE/build -DCMAKE_BUILD_TYPE=debug | ||
- name: Test | ||
run: make -C $GITHUB_WORKSPACE/build -j `nproc` e2e |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.