Skip to content

Commit 1337f68

Browse files
d-e-s-oinsearchoflosttime
authored andcommitted
Build capable example as part of dedicated job
The capable example takes up a somewhat considerable portion of the build phase. Given that it builds with the crate with a different feature, and that nothing else relies on it, we might as well make it a separate job that can run in parallel. So let's do just that. In total, we seem to be reducing total CI duration from somewhere between 7:20 minutes [0] and 9:30 minutes [1] down to about five minutes [2] while also reporting formatting and similar problems much earlier than beforehand. [0] https://github.com/danielocfb/libbpf-rs/actions/runs/3913755036 [1] https://github.com/danielocfb/libbpf-rs/actions/runs/3906846913 [2] https://github.com/danielocfb/libbpf-rs/actions/runs/3915159222 Signed-off-by: Daniel Müller <deso@posteo.net>
1 parent 9c8a25c commit 1337f68

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/rust.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,24 @@ jobs:
5050
sudo rm -f /bin/clang && sudo ln -s /usr/bin/clang-14 /bin/clang
5151
- name: Build
5252
run: cargo build --verbose --workspace --exclude runqslower
53-
- name: Build capable example with static libelf and libz
54-
run: RUSTFLAGS="$RUSTFLAGS -L /usr/lib/x86_64-linux-gnu" cargo build --package capable --features=static
5553
- name: Run tests
5654
# Skip BTF tests which require sudo
5755
run: cargo test --verbose --workspace --exclude runqslower -- --skip test_object --skip test_tc
5856
- name: Run BTF tests
5957
run: cd libbpf-rs && cargo test --verbose -- test_object test_tc
58+
build-capable:
59+
name: Build capable example with static libelf and libz
60+
runs-on: ubuntu-latest
61+
steps:
62+
- uses: actions/checkout@v3
63+
- name: Install deps
64+
run: sudo apt-get install -y libelf-dev
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
toolchain: stable
69+
override: true
70+
- run: RUSTFLAGS="$RUSTFLAGS -L /usr/lib/x86_64-linux-gnu" cargo build --package capable --features=static
6071
clippy:
6172
name: Lint with clippy
6273
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)