# We always build for a foreign GOOS. # GOOS=windows, unless the host is also windows; then linux. # GOARCH=arm, unless the host is also arm; then amd64. # Windows and ARM are both interesting, # and it helps with coverage as we mainly test on linux/amd64. [!windows] env GOOS=windows [windows] env GOOS=linux [!arm] env GOARCH=arm [arm] env GOARCH=arm64 # A fairly average Go build, importing some std libraries. env GOGARBLE='*' garble build -- go.mod -- module test/main go 1.18 -- main.go -- package main import "net/http" func main() { http.ListenAndServe("", nil) }