From f43643edded4c040f48da23a4f028665d0fb47a6 Mon Sep 17 00:00:00 2001 From: "alex.sharov" <AskAlexSharov@gmail.com> Date: Mon, 7 Jun 2021 21:18:16 +0700 Subject: [PATCH] more cgo checks on ci --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index a04ef4611b..de4662e8e6 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ GOBIN = $(CURDIR)/build/bin -GOTEST = go test ./... -p 1 +GOTEST = GODEBUG=cgocheck=2 go test ./... -p 1 GIT_COMMIT ?= $(shell git rev-list -1 HEAD) GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD) GIT_TAG ?= $(shell git describe --tags) GOBUILD = env GO111MODULE=on go build -trimpath -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}" -GO_DBG_BUILD = env CGO_CFLAGS='-O0 -g -DMDBX_BUILD_FLAGS_CONFIG="config.h"' go build -trimpath -tags=debug -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}" -gcflags=all="-N -l" # see delve docs +GO_DBG_BUILD = env CGO_CFLAGS='-O0 -g -DMDBX_BUILD_FLAGS_CONFIG="config.h"' GODEBUG=cgocheck=2 go build -trimpath -tags=debug -ldflags "-X main.gitCommit=${GIT_COMMIT} -X main.gitBranch=${GIT_BRANCH} -X main.gitTag=${GIT_TAG}" -gcflags=all="-N -l" # see delve docs GO_MAJOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1) GO_MINOR_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f2) @@ -28,7 +28,7 @@ go-version: fi docker: - docker build -t turbo-geth:latest --build-arg git_commit='${GIT_COMMIT}' --build-arg git_branch='${GIT_BRANCH} --build-arg git_tag='${GIT_TAG}' . + docker build -t turbo-geth:latest --build-arg git_commit='${GIT_COMMIT}' --build-arg git_branch='${GIT_BRANCH}' --build-arg git_tag='${GIT_TAG}' . docker-compose: docker-compose up -- GitLab