add go cache to distro builds (#6600)

pull/6604/head
Alvin Huang 2019-10-08 15:55:36 -04:00 committed by GitHub
parent 97af2b0929
commit 8d4b8eae38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 10 deletions

View File

@ -94,7 +94,7 @@ jobs:
GOTAGS: "" # No tags for OSS but there are for enterprise GOTAGS: "" # No tags for OSS but there are for enterprise
steps: steps:
- checkout - checkout
- restore_cache: # restore cache from dev-build job - restore_cache: # restore cache from earlier job
keys: keys:
- consul-modcache-v1-{{ checksum "go.mod" }} - consul-modcache-v1-{{ checksum "go.mod" }}
- attach_workspace: - attach_workspace:
@ -147,14 +147,11 @@ jobs:
- image: *GOLANG_IMAGE - image: *GOLANG_IMAGE
environment: &build-env environment: &build-env
<<: *ENVIRONMENT <<: *ENVIRONMENT
GOXPARALLEL: 2 # CircleCI containers are 2 CPU x 4GB RAM
resource_class: large
steps: steps:
- checkout - checkout
- run: | - restore_cache: # restore cache from dev-build job
make tools keys:
# restore any go.{mod,sum} files that were updated indirectly - consul-modcache-v1-{{ checksum "go.mod" }}
git reset --hard HEAD
- run: ./build-support/scripts/build-local.sh - run: ./build-support/scripts/build-local.sh
# save dev build to CircleCI # save dev build to CircleCI
@ -541,9 +538,12 @@ workflows:
- go-test-api: *go-test - go-test-api: *go-test
build-distros: build-distros:
jobs: jobs:
- build-386 - check-vendor
- build-amd64 - build-386: &require-check-vendor
- build-arm requires:
- check-vendor
- build-amd64: *require-check-vendor
- build-arm: *require-check-vendor
test-integrations: test-integrations:
jobs: jobs:
- dev-build - dev-build