Update build (#1081)
* Update build * Only use CGO when building non-Linux. * Update build to Go 1.11 * Use tab indenting consistently. Signed-off-by: Ben Kochie <superq@gmail.com>
This commit is contained in:
parent
0fdc089187
commit
c7dfb82dac
4 changed files with 54 additions and 18 deletions
31
Makefile
31
Makefile
|
|
@ -26,24 +26,41 @@ DOCKERFILE ?= Dockerfile
|
|||
STATICCHECK_IGNORE =
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
OS_detected := Windows
|
||||
OS_detected := Windows
|
||||
else
|
||||
OS_detected := $(shell uname -s)
|
||||
OS_detected := $(shell uname -s)
|
||||
endif
|
||||
|
||||
ifeq ($(GOHOSTARCH),amd64)
|
||||
ifeq ($(OS_detected),$(filter $(OS_detected),Linux FreeBSD Darwin Windows))
|
||||
# Only supported on amd64
|
||||
test-flags := -race
|
||||
endif
|
||||
# Only supported on amd64
|
||||
test-flags := -race
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(OS_detected), Linux)
|
||||
test-e2e := test-e2e
|
||||
test-e2e := test-e2e
|
||||
else
|
||||
test-e2e := skip-test-e2e
|
||||
test-e2e := skip-test-e2e
|
||||
endif
|
||||
|
||||
# Use CGO for non-Linux builds.
|
||||
ifeq ($(GOOS), linux)
|
||||
PROMU_CONF ?= .promu-no-cgo.yml
|
||||
else
|
||||
ifndef GOOS
|
||||
ifeq ($(OS_detected), Linux)
|
||||
PROMU_CONF ?= .promu-no-cgo.yml
|
||||
else
|
||||
PROMU_CONF ?= .promu-cgo.yml
|
||||
endif
|
||||
else
|
||||
PROMU_CONF ?= .promu-cgo.yml
|
||||
endif
|
||||
endif
|
||||
|
||||
PROMU := $(FIRST_GOPATH)/bin/promu --config $(PROMU_CONF)
|
||||
|
||||
e2e-out = collector/fixtures/e2e-output.txt
|
||||
ifeq ($(MACH), ppc64le)
|
||||
e2e-out = collector/fixtures/e2e-64k-page-output.txt
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue