-
Notifications
You must be signed in to change notification settings - Fork 1
45 lines (37 loc) · 1.11 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
name: ci
on:
pull_request:
branches: ["main"]
push:
branches: ["main"]
tags: ["*"]
env:
LIBBPF_VERSION: 1.2.0
jobs:
tests:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version-file: 'go.mod'
# Run unit tests and linters.
- uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-cache: true
- run: make go/test
bpf:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
# Install clang and required tooling.
- run: sudo apt update -y && sudo apt install -y clang-14 libelf-dev llvm
# Install libbpf.
- run: |
curl -sSL "https://github.com/libbpf/libbpf/archive/refs/tags/v${{ env.LIBBPF_VERSION }}.tar.gz" -o /tmp/libbpf.tar.gz
sudo mkdir -p /usr/include/bpf/
sudo tar -xvf /tmp/libbpf.tar.gz --strip-components=2 -C /usr/include/bpf --wildcards "libbpf-${{ env.LIBBPF_VERSION }}/src/*.h"
# Generate BPF and check output for diffs.
- run: make bpf/build
- run: git diff --exit-code ./pkg/bpf/*.go