-
Notifications
You must be signed in to change notification settings - Fork 614
103 lines (99 loc) · 3.83 KB
/
test_ebpf.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
97
98
99
100
101
102
103
name: Test eBPF
on:
push:
branches:
- main
- r[0-9]+ # Trigger builds after a push to weekly branches
paths:
- ebpf/**
pull_request:
paths:
- ebpf/**
concurrency:
# Cancel any running workflow for the same branch when new commits are pushed.
# We group both by ref_name (available when CI is triggered by a push to a branch/tag)
# and head_ref (available when CI is triggered by a PR).
group: "ci-ebpf-${{ github.ref_name }}-${{ github.head_ref }}"
cancel-in-progress: true
jobs:
test_ebpf_amd64:
name: on Bare-metal amd64
runs-on: ubuntu-latest-16-cores
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.7
- name: Test
run: sudo make -C ./ebpf go/test/amd64
test_ebpf_qemu:
name: on QEMU
runs-on: ubuntu-latest-16-cores
strategy:
matrix:
include:
# - arch: amd64 # https://github.com/grafana/pyroscope/issues/3033
# kernel: amd64/boot/vmlinuz-4.19.0-26-amd64
# initrd: amd64/boot/initrd.img-4.19.0-26-amd64
- arch: amd64
kernel: amd64/boot/vmlinuz-5.10.0-28-amd64
initrd: amd64/boot/initrd.img-5.10.0-28-amd64
- arch: amd64
kernel: amd64/boot/vmlinuz-5.15.0-94-generic
initrd: amd64/boot/initrd.img-5.15.0-94-generic
- arch: amd64
kernel: amd64/boot/vmlinuz-5.4.0-150-generic
initrd: amd64/boot/initrd.img-5.4.0-150-generic
- arch: amd64
kernel: amd64/boot/vmlinuz-6.1.0-18-amd64
initrd: amd64/boot/initrd.img-6.1.0-18-amd64
- arch: amd64
kernel: amd64/boot_extra/vmlinuz-5.10.205-195.807.amzn2.x86_64
initrd: amd64/boot_extra/initramfs-5.10.205-195.807.amzn2.x86_64.img
# - arch: arm64 # https://github.com/grafana/pyroscope/issues/3033
# kernel: arm64/boot/vmlinuz-4.19.0-26-arm64
# initrd: arm64/boot/initrd.img-4.19.0-26-arm64
- arch: arm64
kernel: arm64/boot/vmlinuz-5.10.0-28-arm64
initrd: arm64/boot/initrd.img-5.10.0-28-arm64
- arch: arm64
kernel: arm64/boot/vmlinuz-5.15.0-94-generic
initrd: arm64/boot/initrd.img-5.15.0-94-generic
- arch: arm64
kernel: arm64/boot/vmlinuz-5.4.0-150-generic
initrd: arm64/boot/initrd.img-5.4.0-150-generic
- arch: arm64
kernel: arm64/boot/vmlinuz-6.1.0-18-arm64
initrd: arm64/boot/initrd.img-6.1.0-18-arm64
- arch: arm64
kernel: arm64/boot_extra/vmlinuz-5.10.205-195.807.amzn2.aarch64
initrd: arm64/boot_extra/initramfs-5.10.205-195.807.amzn2.aarch64.img
steps:
- name: Checkout code with submodule
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.22.7
- name: Install qemu
run: sudo apt-get update && sudo apt-get -y install qemu-system-x86 qemu-system-aarch64
- name: Build tests
run: make -C ./ebpf ebpf.${{ matrix.arch }}.test
- name: Pull VM image
run: make -C ./ebpf/testdata/qemu_img dist/pull
- name: Start VM
run: >
KVM_ARGS="" ARCH=${{ matrix.arch }} KERNEL=${{ matrix.kernel }} INITRD=${{ matrix.initrd }} make -C ./ebpf/testdata/qemu_img qemu/start_and_wait
- name: Copy test binary
run: >
F=$(realpath ./ebpf/ebpf.${{ matrix.arch }}.test) make -C ./ebpf/testdata/qemu_img qemu/scp
- name: Uname
run: >
CMD="uname -a" make -C ./ebpf/testdata/qemu_img qemu/exec
- name: Run tests
run: >
CMD=./ebpf.${{ matrix.arch }}.test make -C ./ebpf/testdata/qemu_img qemu/exec