Skip to content

Commit

Permalink
makefile: fix helpers-test-static (#215)
Browse files Browse the repository at this point in the history
1. Allow environment variables passing through sudo for the build target.
2. Fix bad environment from github actions nodes when they're updated.
  • Loading branch information
rafaeldtinoco committed Aug 23, 2022
1 parent d881884 commit 1c84c22
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 11 deletions.
7 changes: 1 addition & 6 deletions .github/actions/build-dependencies/action.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
name: Build Dependencies
description: |
Install build dependencies to test and compile tracee artifacts
inputs:
go-version:
description: Version of Go
required: true
default: "1.18"
runs:
using: composite
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: ${{ inputs.go-version }}
go-version: "1.17"
- name: Install Compilers & Formatters
run: |
sudo apt-get update
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ jobs:
uses: actions/checkout@v2
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
with:
go-version: 1.18
- name: Test Helpers
run: |
make helpers-test-static-run
Expand All @@ -27,8 +25,6 @@ jobs:
uses: actions/checkout@v2
- name: Install Dependencies
uses: ./.github/actions/build-dependencies
with:
go-version: 1.18
- name: Static Selftests
run: |
make selftest-static-run
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ helpers-test-static-run: libbpfgo-static
CC=$(CLANG) \
CGO_CFLAGS=$(CGO_CFLAGS_STATIC) \
CGO_LDFLAGS=$(CGO_LDFLAGS_STATIC) \
sudo $(GO) test -v $(HELPERS)/...
sudo -E $(GO) test -v $(HELPERS)/...

helpers-test-dynamic-run: libbpfgo-dynamic
sudo $(GO) test -v $(HELPERS)/...
Expand Down

0 comments on commit 1c84c22

Please sign in to comment.