From a1bad378d29bad446fd8bdc7bea787e0780c0213 Mon Sep 17 00:00:00 2001 From: Cameron Sparr Date: Sun, 18 Oct 2015 14:41:09 -0600 Subject: [PATCH] Turn off GOGC for faster build time in CI --- scripts/circle-test.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/circle-test.sh b/scripts/circle-test.sh index 64d721054..b8363f417 100755 --- a/scripts/circle-test.sh +++ b/scripts/circle-test.sh @@ -6,9 +6,6 @@ BUILD_DIR=$HOME/telegraf-build VERSION=`git describe --always --tags` -# GO_VERSION=go1.4.2 -# source $HOME/.gvm/scripts/gvm -# exit_if_fail gvm use $GO_VERSION # Executes the given statement, and exits if the command returns a non-zero code. function exit_if_fail { @@ -35,7 +32,7 @@ function check_go_fmt { function build { echo -n "=> $1-$2: " GOOS=$1 GOARCH=$2 godep go build -o telegraf-$1-$2 \ - -ldflags "-X main.Version $3" \ + -ldflags "-X main.Version=$3" \ ./cmd/telegraf/telegraf.go du -h telegraf-$1-$2 } @@ -43,6 +40,8 @@ function build { # Set up the build directory, and then GOPATH. exit_if_fail mkdir $BUILD_DIR export GOPATH=$BUILD_DIR +# Turning off GOGC speeds up build times +export GOGC=off export PATH=$GOPATH/bin:$PATH exit_if_fail mkdir -p $GOPATH/src/github.com/influxdb @@ -65,9 +64,8 @@ exit_if_fail cd $GOPATH/src/github.com/influxdb/telegraf # Verify that go fmt has been run check_go_fmt -# Install the code +# Build the code exit_if_fail godep go build -v ./... -exit_if_fail godep go install -v ./... # Run the tests exit_if_fail godep go vet ./...