]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Add pkg/mod caching
authorMatt Joiner <anacrolix@gmail.com>
Tue, 8 Jan 2019 05:57:33 +0000 (16:57 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Tue, 8 Jan 2019 05:57:33 +0000 (16:57 +1100)
.circleci/config.yml

index b3a384587ca37a30f2b6b21d6bf29e79a3f92678..118ed9674ccba446dfa56db5396d39cfabffb361 100644 (file)
@@ -23,15 +23,21 @@ jobs:
       - checkout
       - run: sudo apt-get update
       - run: sudo apt install fuse pv
+      - restore_cache:
+        keys:
+          - go-mod
       - run: go get ./...
       - run: go test -v -race ./... -count 2
       - run: go test -bench . ./...
-      # - run: CGO_ENABLED=0 go get -t -d -v $PROJECT_GO_PACKAGE/...
       - run: set +e; CGO_ENABLED=0 go test -v ./...; true
       - run: go install golang.org/x/mobile/cmd/gomobile
       - run: gomobile init
       - run: gomobile build -target=android $PROJECT_GO_PACKAGE
       # - run: GO111MODULE=off go install github.com/anacrolix/godo
       - run: go install ./cmd/torrentfs
+      - save_cache:
+        key: go-mod
+        paths:
+          - $GOPATH/pkg/mod
       - run: sudo modprobe fuse
       - run: fs/test.sh