From 9e950b473909e566eaabc9dbc6e1ea2548bd6952 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 11 Oct 2018 10:31:05 +0200 Subject: [PATCH] travis: execute make travis step by step Instead of calling 'make travis' directly, we call each step. This lets us better track how much time is spent on each. Also note that we execute 'itest-only' instead of 'itest', and instead execute the dependencies (btcd, build) manually first. We explicitly set the ITEST environment variable, for readability, and define a new COVER. This is currently true when ITEST=true to keep the existing build configuration, but will later be configured to be independent. --- .travis.yml | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 389e1492e..da7030d7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,13 @@ language: go matrix: include: - go: "1.11.x" - env: RACE=TRUE USE_LINT=TRUE + env: RACE=true LINT=true - go: "1.11.x" - env: RACE=FALSE USE_LINT=TRUE + env: ITEST=true COVER=true LINT=true - go: "1.10.x" - env: RACE=TRUE USE_LINT=FALSE + env: RACE=true LINT=false - go: "1.10.x" - env: RACE=FALSE USE_LINT=FALSE + env: ITEST=true COVER=true LINT=false sudo: required install: @@ -18,7 +18,23 @@ install: - export PATH=$PATH:$PWD/linux-amd64/ script: - - make travis + # Common for all builds. + - make dep + - make btcd + + # Run linter if LINT=true. + - 'if [ "$LINT" = true ]; then make lint ; fi' + + # Run unit tests with race condition detector. + - 'if [ "$RACE" = true ]; then make unit-race ; fi' + + # Run integration tests. + - 'if [ "$ITEST" = true ]; then make build ; fi' + - 'if [ "$ITEST" = true ]; then make itest-only ; fi' + + # Run unit tests and generate coverage report. + - 'if [ "$COVER" = true ]; then make unit-cover; fi' + - 'if [ "$COVER" = true ]; then make goveralls; fi' after_script: - echo "Uploading to termbin.com..." && find *.log | xargs -I{} sh -c "cat {} | nc termbin.com 9999 | xargs -r0 printf '{} uploaded to %s'"