-
Notifications
You must be signed in to change notification settings - Fork 7
52 lines (49 loc) · 1.38 KB
/
bpf_test.yml
File metadata and controls
52 lines (49 loc) · 1.38 KB
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
name: bpf tests
on:
push:
pull_request:
permissions:
contents: read
jobs:
test:
name: test-${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
arch: [amd64, arm64]
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: "go.mod"
- name: Install system dependencies for eBPF build
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
libelf-dev \
clang \
llvm \
libbpf-dev
- name: Generate eBPF code
run: |
make generate-ebpf
go test -c ./internal/bpf/... -o tester
- name: Run eBPF test
run: |
make test-bpf
- name: Validate bpf tests using bpfvalidator
uses: ./.github/actions/bpfvalidator
with:
args: |
--config=${{ github.workspace }}/bpfvalidator-${{ matrix.arch }}-config.yaml --cmd=${{ github.workspace }}/tester -test.v
arch: ${{ matrix.arch }}