mirror of
https://github.com/zrepl/zrepl.git
synced 2025-01-20 13:18:47 +01:00
circleci: use orb circlci/go for module caching
This commit is contained in:
parent
1e8ffe4486
commit
5e4d4188f4
@ -1,5 +1,8 @@
|
|||||||
version: 2.1
|
version: 2.1
|
||||||
|
orbs:
|
||||||
|
# NB: 1.7.2 is not the Go version, but the Orb version
|
||||||
|
# https://circleci.com/developer/orbs/orb/circleci/go#usage-go-modules-cache
|
||||||
|
go: circleci/go@1.7.2
|
||||||
commands:
|
commands:
|
||||||
setup-home-local-bin:
|
setup-home-local-bin:
|
||||||
steps:
|
steps:
|
||||||
@ -31,17 +34,6 @@ commands:
|
|||||||
# The need for this was required for cimg/go:1.12, but let's future proof this here and now.
|
# The need for this was required for cimg/go:1.12, but let's future proof this here and now.
|
||||||
- run: sudo apt-get install -y git ca-certificates
|
- run: sudo apt-get install -y git ca-certificates
|
||||||
|
|
||||||
restore-cache-gomod:
|
|
||||||
steps:
|
|
||||||
- restore_cache:
|
|
||||||
key: go-mod-v4-{{ checksum "go.sum" }}
|
|
||||||
save-cache-gomod:
|
|
||||||
steps:
|
|
||||||
- save_cache:
|
|
||||||
key: go-mod-v4-{{ checksum "go.sum" }}
|
|
||||||
paths:
|
|
||||||
- "/go/pkg/mod"
|
|
||||||
|
|
||||||
install-godep:
|
install-godep:
|
||||||
steps:
|
steps:
|
||||||
- apt-update-and-install-common-deps
|
- apt-update-and-install-common-deps
|
||||||
@ -179,12 +171,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
|
|
||||||
|
- go/load-cache:
|
||||||
|
key: quickcheck-<<parameters.goversion>>
|
||||||
- install-godep
|
- install-godep
|
||||||
|
|
||||||
- restore-cache-gomod
|
|
||||||
- run: go mod download
|
- run: go mod download
|
||||||
- run: cd build && go mod download
|
- run: cd build && go mod download
|
||||||
- save-cache-gomod
|
- go/save-cache:
|
||||||
|
key: quickcheck-<<parameters.goversion>>
|
||||||
|
|
||||||
- run: make formatcheck
|
- run: make formatcheck
|
||||||
- run: make generate-platform-test-list
|
- run: make generate-platform-test-list
|
||||||
@ -229,9 +222,11 @@ jobs:
|
|||||||
- image: cimg/go:<<parameters.goversion>>
|
- image: cimg/go:<<parameters.goversion>>
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore-cache-gomod
|
- go/load-cache:
|
||||||
|
key: make-test-go
|
||||||
- run: make test-go
|
- run: make test-go
|
||||||
# don't save-cache-gomod here, test-go doesn't pull all the dependencies
|
- go/save-cache:
|
||||||
|
key: make-test-go
|
||||||
|
|
||||||
release-build:
|
release-build:
|
||||||
machine:
|
machine:
|
||||||
|
Loading…
Reference in New Issue
Block a user