Skip to content

Commit

Permalink
test: build all non-main modules for mobile (#1036)
Browse files Browse the repository at this point in the history
Ensure that we don't break the build for mobile by doing a `go build`
for all of the non-main modules in the repo. Should hopefully catch
issues like #1035 sooner.
  • Loading branch information
wadey committed Dec 21, 2023
1 parent 927ff4c commit 3a22181
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: End 2 end
run: make e2evv

- name: Build test mobile
run: make build-test-mobile

- uses: actions/upload-artifact@v3
with:
name: e2e packet flow
Expand Down
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,12 @@ test-cov-html:
go test -coverprofile=coverage.out
go tool cover -html=coverage.out

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/')

bench:
go test -bench=.

Expand Down Expand Up @@ -214,5 +220,5 @@ smoke-docker-race: CGO_ENABLED = 1
smoke-docker-race: smoke-docker

.FORCE:
.PHONY: e2e e2ev e2evv e2evvv e2evvvv test test-cov-html bench bench-cpu bench-cpu-long bin proto release service smoke-docker smoke-docker-race
.PHONY: bench bench-cpu bench-cpu-long bin build-test-mobile e2e e2ev e2evv e2evvv e2evvvv proto release service smoke-docker smoke-docker-race test test-cov-html
.DEFAULT_GOAL := bin

0 comments on commit 3a22181

Please sign in to comment.