Link an android binary in build-test-mobile

The package builds only compile, so a linker-only failure could not fail
CI. anet relies on //go:linkname, which the linker rejects on Go 1.23+
without -checklinkname=0, so linking cmd/nebula for android both covers
that regression and records the flag requirement.
This commit is contained in:
John Maguire
2026-07-24 17:53:55 -04:00
parent 8cbee0e965
commit 28cff022ee
+3
View File
@@ -222,11 +222,14 @@ test-cov-html:
go test -coverprofile=coverage.out
go tool cover -html=coverage.out
# The package builds only compile. The final line links an android binary so a linker-only failure,
# such as the //go:linkname reference anet makes, cannot pass CI.
build-test-mobile:
GOARCH=amd64 GOOS=ios go build $(shell go list ./... | grep -v '/cmd/\|/examples/')
GOARCH=arm64 GOOS=ios go build $(shell go list ./... | grep -v '/cmd/\|/examples/')
GOARCH=amd64 GOOS=android go build $(shell go list ./... | grep -v '/cmd/\|/examples/')
GOARCH=arm64 GOOS=android go build $(shell go list ./... | grep -v '/cmd/\|/examples/')
GOARCH=arm64 GOOS=android go build -ldflags=-checklinkname=0 -o /dev/null ${NEBULA_CMD_PATH}
bench:
go test -bench=.