ci: Update ci.yml to use simpler make build to build testing binaries (#1278)

* ci: Update ci.yml to use simpler make build to build testing binaries

Signed-off-by: Mercurio <signormercurio@gmail.com>

* fix GOARCH bug in Makefile

Signed-off-by: Mercurio <signormercurio@gmail.com>

* attempt to remove some of the dependencies

Signed-off-by: Mercurio <signormercurio@gmail.com>

* sync makefile and goreleaser build flags

Signed-off-by: Mercurio <signormercurio@gmail.com>
This commit is contained in:
Mercurio
2022-07-09 01:24:29 +08:00
committed by GitHub
parent 0b91bdeb5e
commit b89d95d148
5 changed files with 17 additions and 36 deletions
+4 -4
View File
@@ -40,12 +40,12 @@ endif
# only support linux
GOOS=linux
# set a specific GOARCH
ifeq ($(origin GOARCH), undefined)
GOARCH := $(shell go env GOARCH)
endif
# set a specific PLATFORM
ifeq ($(origin PLATFORM), undefined)
ifeq ($(origin GOARCH), undefined)
GOARCH := $(shell go env GOARCH)
endif
PLATFORM := $(GOOS)_$(GOARCH)
endif
+3 -2
View File
@@ -15,12 +15,13 @@
GO := go
GO_LDFLAGS += -X $(VERSION_PACKAGE).gitVersion=${GIT_TAG} \
-X $(VERSION_PACKAGE).gitCommit=${GIT_COMMIT} \
-X $(VERSION_PACKAGE).buildDate=${BUILD_DATE}
-X $(VERSION_PACKAGE).buildDate=${BUILD_DATE} \
-s -w
ifeq ($(DEBUG), 1)
GO_BUILD_FLAGS += -gcflags "all=-N -l"
GO_LDFLAGS=
endif
GO_BUILD_FLAGS += -tags "containers_image_openpgp netgo exclude_graphdriver_devicemapper static osusergo exclude_graphdriver_btrfs" -ldflags "$(GO_LDFLAGS)"
GO_BUILD_FLAGS += -tags "containers_image_openpgp netgo exclude_graphdriver_devicemapper static osusergo exclude_graphdriver_btrfs" -trimpath -ldflags "$(GO_LDFLAGS)"
ifeq ($(ROOT_PACKAGE),)
$(error the variable ROOT_PACKAGE must be set prior to including golang.mk)