forked from linuxkerneltravel/lmp
-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (77 loc) · 2.64 KB
/
ebpf_net_traffic_manager.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
name: Traffic Manager
on:
push:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Network_Subsystem/TrafficManager/**'
- '.github/workflows/net_traffic_manager.yml'
pull_request:
branches:
- "*"
paths:
- 'eBPF_Supermarket/Network_Subsystem/TrafficManager/**'
- '.github/workflows/net_traffic_manager.yml'
jobs:
TrafficManager_build-and-test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Cache bpftool build directory
id: cache-bpftool
uses: actions/cache@v3
with:
path: bpftool
key: bpftool-v7.2.0-amd64
# - name: Install Docker
# run: |
# sudo snap refresh
# sudo snap install docker
- name: Install Minikube
uses: medyagh/setup-minikube@latest
id: minikube
# with:
# driver: docker
# minikube-version: 1.24.0
# kubernetes-version: v1.26.6
# container-runtime: containerd
- name: Setup testing environments
run: |
kubectl apply -f eBPF_Supermarket/Network_Subsystem/TrafficManager/acceptance/testdata/k8s/
- name: Install eBPF development tools
run: |
sudo ln -s /usr/bin/llvm-strip-14 /usr/bin/llvm-strip
# sudo apt install -y llvm clang
- name: Build bpftool
if: steps.cache-bpftool.outputs.cache-hit != 'true'
run: |
rm -rf bpftool && mkdir bpftool && cd bpftool
wget https://github.com/libbpf/bpftool/releases/download/v7.2.0/bpftool-v7.2.0-amd64.tar.gz
sudo tar -xzf bpftool-v7.2.0-amd64.tar.gz
rm -f bpftool-v7.2.0-amd64.tar.gz
sudo chmod +x bpftool
- name: Install bpftool
run: |
sudo cp bpftool/bpftool /usr/bin/
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: eBPF_Supermarket/Network_Subsystem/TrafficManager/go.mod
cache-dependency-path: eBPF_Supermarket/Network_Subsystem/TrafficManager/go.sum
- name: Load Dependency
run: |
cd eBPF_Supermarket/Network_Subsystem/TrafficManager/
sudo go mod tidy
- name: Build
run: |
cd eBPF_Supermarket/Network_Subsystem/TrafficManager/
sudo make init
sudo make build
- name: Run
run: |
cd eBPF_Supermarket/Network_Subsystem/TrafficManager/
sudo -E timeout 10 ./main || if [[ $? != 124 && $? != 0 ]]; then exit $?; fi
- name: Test
run: |
cd eBPF_Supermarket/Network_Subsystem/TrafficManager/
make test