Setup GitHub Actions #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: [pull_request] | |
name: gmon test | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: docker build -t gmonbuildenv -f Dockerfile.buildenv . | |
- name: Build gmon | |
run: docker run --rm -v ${{ github.workspace }}:/src -e GOFLAGS="-buildvcs=false" -e BPF_CLANG="clang" -e BPF_CFLAGS="-O2 -g -Wall -Werror" gmonbuildenv bash -c "bpftool btf dump file /sys/kernel/btf/vmlinux format c > ./ebpf/c/vmlinux.h && go generate -x ./... && CGO_ENABLED=0 go build -o /src/bin/gmon" | |
- run: docker build -t gmone2e -f Dockerfile.e2e . | |
- name: Run e2e tests | |
run: | | |
docker run --rm --privileged -v ${{ github.workspace }}/bin/gmon:/usr/bin/gmon -v /sys/kernel/debug:/sys/kernel/debug:ro gmone2e |