Skip to content

Commit b7dffaf

Browse files
d-e-s-odanielocfb
authored andcommittedNov 1, 2024·
Add CI job testing against libbpf-rs
Add a CI job that tests building libbpf-rs and its examples & tests against the current version of vmlinux.h. Signed-off-by: Daniel Müller <[email protected]>
1 parent d45c0e2 commit b7dffaf

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed
 

‎.github/workflows/test.yml

+28
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,31 @@ jobs:
4545
- uses: actions/checkout@v4
4646
- uses: dtolnay/rust-toolchain@stable
4747
- run: cargo doc --no-deps
48+
test-libbpf-rs:
49+
# check that libbpf-rs, one of the main consumers of the library, works with
50+
# this version
51+
name: Test libbpf-rs integration
52+
runs-on: ubuntu-latest
53+
# This test is just informative; certain failures *may* be expected.
54+
continue-on-error: true
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@v4
58+
- name: Checkout libbpf-rs
59+
uses: actions/checkout@v4
60+
with:
61+
repository: libbpf/libbpf-rs
62+
path: libbpf-rs
63+
- name: Install development dependencies
64+
run: sudo apt-get install -y gcc-multilib libelf-dev zlib1g-dev
65+
- name: Build libbpf-rs
66+
run: |
67+
dir=$(pwd)
68+
cd libbpf-rs
69+
# Patch the vmlinux.h version in use.
70+
cat >> Cargo.toml <<EOF
71+
[patch."https://github.com/libbpf/vmlinux.h.git"]
72+
vmlinux = { path = "${dir}" }
73+
EOF
74+
cargo update
75+
cargo check --tests

0 commit comments

Comments
 (0)
Please sign in to comment.