From 5a06d5eefc8e60dcd547c691b1d79efa3afb00c0 Mon Sep 17 00:00:00 2001 From: James Phillips Date: Tue, 25 Oct 2016 13:49:57 -0700 Subject: [PATCH] Only builds the binary stuff under master branch CI. --- .travis.yml | 3 +-- GNUmakefile | 12 ++++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1a72afff62..3111b9ee1d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,7 @@ branches: only: - master -install: make script: - - make test + - make ci sudo: false diff --git a/GNUmakefile b/GNUmakefile index a11af8532a..a822e0246a 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -10,7 +10,15 @@ VETARGS?=-asmdecl -atomic -bool -buildtags -copylocks -methods \ VERSION?=$(shell awk -F\" '/^const Version/ { print $$2; exit }' version.go) # all builds binaries for all targets -all: tools +all: bin + +ci: + if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then \ + $(MAKE) bin ;\ + fi + @$(MAKE) test + +bin: tools @mkdir -p bin/ @sh -c "'$(CURDIR)/scripts/build.sh'" @@ -61,4 +69,4 @@ static-assets: tools: go get -u -v $(GOTOOLS) -.PHONY: all bin dev dist cov test cover format vet static-assets tools +.PHONY: all ci bin dev dist cov test cover format vet static-assets tools