File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ machine :
2+ services :
3+ - docker
4+
5+ dependencies :
6+ cache_directories :
7+ - " ~/.ethash" # Cache the ethash DAG generated by hive for consecutive builds
8+ - " ~/.docker" # Cache all docker images manually to avoid lengthy rebuilds
9+ override :
10+ # Restore all previously cached docker images
11+ - mkdir -p ~/.docker
12+ - for img in `ls ~/.docker`; do docker load -i ~/.docker/$img; done
13+
14+ # Pull in and hive, restore cached ethash DAGs and do a dry run
15+ - go get -u github.com/karalabe/hive
16+ - (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/ethash/ ~/.ethash)
17+ - (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.ethash/. workspace/ethash/)
18+ - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6)
19+
20+ # Cache all the docker images and the ethash DAGs
21+ - for img in `docker images | grep -v "^<none>" | tail -n +2 | awk '{print $1}'`; do docker save $img > ~/.docker/`echo $img | tr '/' ':'`.tar; done
22+ - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/ethash/. ~/.ethash
23+
24+ test :
25+ override :
26+ # Build Geth and move into a known folder
27+ - make geth
28+ - cp ./build/bin/geth $HOME/geth
29+
30+ # Run hive and move all generated logs into the public artifacts folder
31+ - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.)
32+ - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS
You can’t perform that action at this time.
0 commit comments