-
Notifications
You must be signed in to change notification settings - Fork 26
97 lines (76 loc) · 2.56 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build-tools:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install system tools
run: |
sudo apt update
sudo apt install -y qemu-system-x86 cmake ninja-build clang lld git libbpf-dev
# we need to fetch rust deps first to speed up cargo xtask
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
~/.rustup
target
# if xtask changed maybe linker version changed so we don't want old objects to mess with new ones
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock', '**/.github/workflows/ci.yml', '**/xtask/') }}
- id: cache-key
run: echo "cache-key=$(cargo xtask build-tools --action-cache-key)" >> "$GITHUB_OUTPUT"
- name: Cache build tools
uses: actions/cache@v3
with:
path: |
build-tools/
key: ${{ steps.cache-key.outputs.cache-key }}
- name: Build-Tools (LLVM and bpf-linker)
run: cargo xtask build-tools --free-space
build:
needs: build-tools
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install system tools
run: |
sudo apt update
sudo apt install -y qemu-system-x86 cmake ninja-build clang lld git libbpf-dev
# we need to fetch rust deps first to speed up cargo xtask
- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo
~/.rustup
target
# if xtask changed maybe linker version changed so we don't want old objects to mess with new ones
key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock', '**/.github/workflows/ci.yml', '**/xtask/') }}
- id: cache-key
run: echo "cache-key=$(cargo xtask build-tools --action-cache-key)" >> "$GITHUB_OUTPUT"
- name: Cache build tools
uses: actions/cache@v3
with:
path: |
build-tools/
key: ${{ steps.cache-key.outputs.cache-key }}
- name: Build (eBPF and userland)
run: cargo xtask build --release
- name: Linux Kernel LTS 5.4
run: ./scripts/ci/test_kernel.sh 5.4
- name: Linux Kernel LTS 5.10
run: ./scripts/ci/test_kernel.sh 5.10
- name: Linux Kernel LTS 5.15
run: ./scripts/ci/test_kernel.sh 5.15
- name: Linux Kernel LTS 6.1
run: ./scripts/ci/test_kernel.sh 6.1