Skip to content
Snippets Groups Projects
Commit 0221ff67 authored by Neil-Jocelyn Schark's avatar Neil-Jocelyn Schark
Browse files

statically build go by disabling build of CGO

parent 64bab47e
No related branches found
No related tags found
2 merge requests!152Draft: Scratch container,!151Statically linked binaries
Pipeline #205979 passed
...@@ -11,7 +11,7 @@ GOBIN := $(GOSDN_PRG) ...@@ -11,7 +11,7 @@ GOBIN := $(GOSDN_PRG)
GOLANG_VERSION := 1.22 GOLANG_VERSION := 1.22
GOLANGCI_LINT_VERSION=v1.59.1 GOLANGCI_LINT_VERSION=v1.59.1
GOCMD=go GOCMD=CGO_ENABLED=0 go
GOBUILD=$(GOCMD) build GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean -cache -fuzzcache -testcache -modcache GOCLEAN=$(GOCMD) clean -cache -fuzzcache -testcache -modcache
BUILD_ARTIFACTS_PATH=artifacts BUILD_ARTIFACTS_PATH=artifacts
...@@ -47,7 +47,7 @@ unit-test: ...@@ -47,7 +47,7 @@ unit-test:
build: build-gokms build-quantumlayer build-etsi14module build-akms-simulator build: build-gokms build-quantumlayer build-etsi14module build-akms-simulator
build-gokms: pre build-gokms: pre
CGO_ENABLED=0 $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/goKMS ./goKMS/main.go $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/goKMS ./goKMS/main.go
build-quantumlayer: pre build-quantumlayer: pre
$(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/quantumlayer ./quantumlayer/main/main.go $(GOBUILD) -o $(BUILD_ARTIFACTS_PATH)/quantumlayer ./quantumlayer/main/main.go
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment