forked from linuxkerneltravel/lmp
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (34 loc) · 1.24 KB
/
libbpf.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
name: libbpf
on:
push:
branches:
- "*"
paths:
- 'eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay/**'
- '.github/workflows/libbpf.yml'
pull_request:
branches:
- "*"
paths:
- 'eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay/**'
- '.github/workflows/libbpf.yml'
jobs:
libbpf-project-build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt install clang libelf1 libelf-dev zlib1g-dev
sudo apt install libbpf-dev
sudo apt install linux-tools-5.15.0-53-generic
sudo apt install linux-cloud-tools-5.15.0-53-generic
- name: Run cs_delay
run: |
cd eBPF_Supermarket/CPU_Subsystem/cs_delay/libbpf_cs_delay
# sudo bpftool btf dump file /sys/kernel/btf/vmlinux format c > vmlinux.h
clang -g -O2 -target bpf -D__TARGET_ARCH_x86 -I/usr/include/x86_64-linux-gnu -I. -c cs_delay.bpf.c -o cs_delay.bpf.o
sudo bpftool gen skeleton cs_delay.bpf.o > cs_delay.skel.h
clang -g -O2 -Wall -I . -c cs_delay.c -o cs_delay.o
clang -Wall -O2 -g cs_delay.o -static -lbpf -lelf -lz -o cs_delay
sudo ./cs_delay