From c5594e29184ea84e521d4d8f8b96e1e034859197 Mon Sep 17 00:00:00 2001 From: kongfei605 Date: Wed, 5 Jun 2024 10:53:22 +0800 Subject: [PATCH] chore: building test for all platforms (#955) --- Makefile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Makefile b/Makefile index 27e23058..8ad0b305 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,22 @@ build: echo "Building version $(GIT_VERSION)" go build -ldflags $(LDFLAGS) -o $(APP) +build-test: + echo "Building version $(GIT_VERSION)" + go build -ldflags $(LDFLAGS) -o $(APP) + echo "Linux amd64 building version $(GIT_VERSION)" + GOOS=linux GOARCH=amd64 go build -ldflags $(LDFLAGS) -o $(APP) + echo "Linux arm64 building version $(GIT_VERSION)" + GOOS=linux GOARCH=arm64 go build -ldflags $(LDFLAGS) -o $(APP) + echo "Windows amd64 building version $(GIT_VERSION)" + GOOS=windows GOARCH=amd64 go build -ldflags $(LDFLAGS) -o $(APP).exe + echo "Windows arm64 building version $(GIT_VERSION)" + GOOS=windows GOARCH=arm64 go build -ldflags $(LDFLAGS) -o $(APP).exe + echo "Linux amd64 slim building version $(GIT_VERSION)" + GOOS=linux GOARCH=amd64 go build --tags "no_logs no_prometheus no_traces" -ldflags $(LDFLAGS) -o $(APP) + echo "Linux arm64 slim building version $(GIT_VERSION)" + GOOS=linux GOARCH=arm64 go build --tags "no_logs no_prometheus no_traces" -ldflags $(LDFLAGS) -o $(APP) + build-pure: echo "Building version $(GIT_VERSION)" go build --tags "no_prometheus no_traces" -ldflags $(LDFLAGS) -o $(APP)