1
0
Fork 0
mirror of https://github.com/imjasonh/snoop synced 2026-07-18 06:35:10 +00:00

initial commit

Signed-off-by: Jason Hall <jason@chainguard.dev>
This commit is contained in:
Jason Hall 2026-01-14 09:55:28 -05:00
commit f793a98161
21 changed files with 2311 additions and 0 deletions

45
.github/workflows/build.yaml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y clang llvm libbpf-dev linux-headers-generic
- name: Generate vmlinux.h
run: |
sudo bpftool btf dump file /sys/kernel/btf/vmlinux format c > pkg/ebpf/bpf/vmlinux.h
- name: Generate eBPF code
run: go generate ./pkg/ebpf/bpf
- name: Build
run: go build -v ./cmd/snoop
- name: Run tests
run: go test -v ./...
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/staticcheck-action@v1
with:
version: "latest"