summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDave Henderson <dhenderson@gmail.com>2024-06-23 19:55:51 -0400
committerGitHub <noreply@github.com>2024-06-23 19:55:51 -0400
commit36bafcf8a275d8f350511d638fa5b54008e345b3 (patch)
tree54fc6bbf5151365690977492952ea159257b8830 /Makefile
parent62901868f10e887f602e85b37eac70c77f864cc4 (diff)
ci(test): Add 32-bit CI tests (#2126)
Signed-off-by: Dave Henderson <dhenderson@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 5 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 046092da..b1a9381e 100644
--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,11 @@ $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS)): $(PREFIX)/bin/$(PKG_NAME)_$(
build: $(PREFIX)/bin/$(PKG_NAME)_$(GOOS)-$(GOARCH)$(TARGETVARIANT)$(call extension,$(GOOS)) $(PREFIX)/bin/$(PKG_NAME)$(call extension,$(GOOS))
-ifeq ($(OS),Windows_NT)
+# test with race detector on supported platforms
+# windows/amd64 is supported in theory, but in practice it requires a C compiler
+race_platforms := 'linux/amd64' 'darwin/amd64' 'darwin/arm64'
+ifeq (,$(findstring '$(GOOS)/$(GOARCH)',$(race_platforms)))
+export CGO_ENABLED=0
test:
$(GO) test -coverprofile=c.out ./...
else