Skip to content

Commit ca11bb1

Browse files
committed
Merge pull request #21 from zencoder/circle-cache
Reduce caching of unused directories in CircleCI
2 parents 9cc23a8 + 7393ff3 commit ca11bb1

File tree

1 file changed

+31
-17
lines changed

1 file changed

+31
-17
lines changed

circle.yml

Lines changed: 31 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,44 @@
11
machine:
22
environment:
3-
AWS_ACCESS_KEY_ID: a
4-
AWS_SECRET_ACCESS_KEY: b
3+
AWS_ACCESS_KEY_ID: 1
4+
AWS_SECRET_ACCESS_KEY: 1
55
GO15VENDOREXPERIMENT: 1
6+
GOPATH: $HOME/gocode
7+
PATH: $GOPATH/bin:$PATH
8+
ZENPATH: $HOME/gocode/src/github.com/zencoder
9+
SRC_DIR: $ZENPATH/go-remote-config
610
checkout:
711
post:
8-
- rm -rf ~/.go_workspace/src/github.com/zencoder
9-
- mkdir -p ~/.go_workspace/src/github.com/zencoder
10-
- cp -R ~/go-remote-config ~/.go_workspace/src/github.com/zencoder/go-remote-config
12+
- mv "$ZENPATH" /tmp || echo
13+
- mkdir -p "$ZENPATH"
14+
- cp -R ~/go-remote-config "$SRC_DIR"
15+
- mkdir -p ~/download_cache
1116
dependencies:
17+
cache_directories:
18+
- "~/download_cache"
19+
- "~/gocode/bin"
1220
pre:
1321
- sudo apt-get remove --purge golang
1422
- sudo rm -rf /usr/local/go/
15-
- mkdir /tmp/go && wget 'https://storage.googleapis.com/golang/go1.5.1.linux-amd64.tar.gz' -O /tmp/go/go1.5.1.linux-amd64.tar.gz
16-
- sudo tar -xzf /tmp/go/go1.5.1.linux-amd64.tar.gz -C /usr/local
17-
- wget 'https://github.com/Masterminds/glide/releases/download/0.8.3/glide-0.8.3-linux-amd64.tar.gz' -O /tmp/go/glide-0.8.3-linux-amd64.tar.gz
18-
- tar -xzf /tmp/go/glide-0.8.3-linux-amd64.tar.gz -C /tmp/go
19-
- sudo cp /tmp/go/linux-amd64/glide /usr/local/bin/glide
23+
- cd ~/download_cache && wget --no-clobber 'https://storage.googleapis.com/golang/go1.5.3.linux-amd64.tar.gz'
24+
- cd ~/download_cache && sudo tar -xzf go1.5.3.linux-amd64.tar.gz -C /usr/local
25+
- cd ~/download_cache && wget --no-clobber 'https://github.com/Masterminds/glide/releases/download/0.8.3/glide-0.8.3-linux-amd64.tar.gz'
26+
- cd ~/download_cache && tar -xzf glide-0.8.3-linux-amd64.tar.gz
27+
- cd ~/download_cache && sudo cp linux-amd64/glide /usr/local/bin/glide
2028
override:
21-
- go get golang.org/x/tools/cmd/cover
22-
- go get github.com/mattn/goveralls
23-
- go get github.com/modocache/gover
24-
- cd ~/.go_workspace/src/github.com/zencoder/go-remote-config && glide install
29+
- type cover || go get golang.org/x/tools/cmd/cover
30+
- type goveralls || go get github.com/mattn/goveralls
31+
- type gover || go get github.com/modocache/gover
32+
- cd "$SRC_DIR" && glide install
33+
post:
34+
- mv ~/.go_workspace /tmp || echo
35+
- mv ~/.gradle /tmp || echo
36+
- mv ~/.ivy2 /tmp || echo
37+
- mv ~/.m2 /tmp || echo
38+
- mv ~/.rvm /tmp || echo
2539
test:
2640
override:
27-
- cd ~/.go_workspace/src/github.com/zencoder/go-remote-config && make test
41+
- cd "$SRC_DIR" && make test
2842
post:
29-
- cd ~/.go_workspace/src/github.com/zencoder/go-remote-config && make cover
30-
- cd ~/.go_workspace/src/github.com/zencoder/go-remote-config && make coveralls; echo "Coveralls Finished"
43+
- cd "$SRC_DIR" && make cover
44+
- cd "$SRC_DIR" && make coveralls

0 commit comments

Comments
 (0)