-
Notifications
You must be signed in to change notification settings - Fork 60
73 lines (59 loc) · 1.5 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
- staging
schedule:
- cron: 00 4 * * *
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest stable
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Install latest nightly
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rust-src
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
examples/aya-tool
examples/cgroup-skb-egress
examples/kprobetcp
examples/lsm-nice
examples/tc-egress
examples/xdp-drop
examples/xdp-hello
examples/xdp-log
- uses: taiki-e/install-action@v2
with:
tool: bpf-linker
- name: Set up Python
uses: actions/setup-python@v5
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build docs
run: mkdocs build
- name: Check Examples
run: |
for dir in ./examples/*/ ; do
pushd "${dir}"
echo "Example: ${dir}."
cargo xtask build-ebpf --release
cargo build --release
popd
done