From f08c16f6fff107dba829b3d961c602f85158221b Mon Sep 17 00:00:00 2001 From: Mahe Tardy Date: Tue, 19 Dec 2023 19:53:31 +0000 Subject: [PATCH] workflows: run BPF unit tests on BPF changes Signed-off-by: Mahe Tardy --- .github/workflows/bpf-unit-tests.yml | 32 ++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/bpf-unit-tests.yml diff --git a/.github/workflows/bpf-unit-tests.yml b/.github/workflows/bpf-unit-tests.yml new file mode 100644 index 00000000000..b9763ceb5a1 --- /dev/null +++ b/.github/workflows/bpf-unit-tests.yml @@ -0,0 +1,32 @@ +name: BPF Unit Tests +on: + pull_request: + paths: + - 'bpf/**' + push: + branches: + - main + paths: + - 'bpf/**' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-22.04, actuated-arm64-4cpu-8gb ] + steps: + - name: Checkout code + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Install Go + uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0 + with: + # renovate: datasource=golang-version depName=go + go-version: '1.21.5' + + - name: Install LLVM + run: sudo apt-get -y install clang llvm + + - name: Run BPF unit test + run: make bpf-test BPFGOTESTFLAGS="-v"