-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: create a dedicated CI workflow for forks
Forked bpfilter repositories can't use the project's runner, and the GitHub-provided runners use an old kernel, preventing unit tests from being run. This change disable the project's CI workflows building bpfilter on the self-hosted runners and add a new workflow, specific to forks, to build bpfilter and run a few checks. Signed-off-by: Quentin Deslandes <[email protected]>
- Loading branch information
1 parent
53ab9f8
commit 82f4975
Showing
3 changed files
with
54 additions
and
0 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
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Fork-specific CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
permissions: | ||
checks: write | ||
pull-requests: write | ||
|
||
jobs: | ||
full: | ||
if: github.repository != 'facebook/bpfilter' | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# This forces GitHub to print "fedora:39, x64" in the job name. | ||
system: ["fedora:39"] | ||
arch: ["X64"] | ||
mode: ["release", "debug"] | ||
container: "${{ matrix.system }}" | ||
runs-on: ["ubuntu-latest"] | ||
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 \ | ||
clang-tools-extra \ | ||
cmake \ | ||
libcmocka-devel \ | ||
doxygen \ | ||
lcov \ | ||
libasan \ | ||
libbpf-devel \ | ||
libubsan \ | ||
python3-breathe \ | ||
python3-furo \ | ||
python3-sphinx \ | ||
pkgconf | ||
- 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 | ||
# Skip unit tests, the GitHub-hosted runners' kernel is too old. | ||
# Skip coverage as unit tests are not run. | ||
- name: Check style | ||
run: make -C $GITHUB_WORKSPACE/build checkstyle | ||
- name: Generate documentation | ||
run: make -C $GITHUB_WORKSPACE/build doc |
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