From ee72533ed42df09f492eba57751762433303ed2a Mon Sep 17 00:00:00 2001 From: Thomas Orozco Date: Fri, 15 Feb 2019 13:26:11 +0100 Subject: [PATCH] Disable cgo When we introduced Sentry error-reporting, we pulled in the Go network stack, and that resulted in building binaries that link to libc. This updates our CI scripts to: - Disable CGO - Check the binaries are static Closes: #47 --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f977f87..36e741d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,8 @@ jobs: script: - mkdir -p dist - export GOOS="linux" - - for arch in amd64 386 arm arm64; do GOARCH="$arch" go build && mv supercronic "dist/supercronic-${GOOS}-${arch}"; done + - export CGO_ENABLED=0 + - for arch in amd64 386 arm arm64; do GOARCH="$arch" go build && file supercronic | grep 'statically linked' && mv supercronic "dist/supercronic-${GOOS}-${arch}"; done - pushd dist - ls -lah * - file *