Skip to content

Commit

Permalink
.github: change 'go test' and 'go build' executions
Browse files Browse the repository at this point in the history
As of Go 1.21:

go build ./... seems to build all main subpackages discarding output binaries.
go test -c -o /dev/null also works as expected.

Signed-off-by: Timo Beckers <[email protected]>
  • Loading branch information
ti-mo committed Sep 28, 2023
1 parent 015d036 commit c589daf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,30 +45,30 @@ jobs:
go test -v ./cmd/bpf2go
- name: Build examples
run: go build -v -o "$(mktemp -d)" ./...
run: go build -v ./...
working-directory: ./examples

- name: Cross build darwin
env:
GOOS: darwin
run: |
go build ./...
for p in $(go list ./...) ; do go test -c $p || exit ; done
go build -v ./...
go test -c -o /dev/null ./... >/dev/null
- name: Cross build arm32
env:
GOARCH: arm
GOARM: 6
run: |
go build ./...
for p in $(go list ./...) ; do go test -c $p || exit ; done
go build -v ./...
go test -c -o /dev/null ./... >/dev/null
- name: Cross build arm64
env:
GOARCH: arm64
run: |
go build ./...
for p in $(go list ./...) ; do go test -c $p || exit ; done
go build -v ./...
go test -c -o /dev/null ./... >/dev/null
test-on-prev-go:
name: Run tests on previous stable Go
Expand Down

0 comments on commit c589daf

Please sign in to comment.