diff options
author | Péter Szilágyi <peterke@gmail.com> | 2016-07-14 20:27:07 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2016-07-15 21:07:34 +0800 |
commit | 6f1e45d5ba55dd55cafc81ef7d52457d16631686 (patch) | |
tree | fe9d677b462787f89564af22a4bf3624da8dbc72 /circle.yml | |
parent | b7caa1751c83db797f648659bcf1cdb3c6be940a (diff) | |
download | go-tangerine-6f1e45d5ba55dd55cafc81ef7d52457d16631686.tar.gz go-tangerine-6f1e45d5ba55dd55cafc81ef7d52457d16631686.tar.zst go-tangerine-6f1e45d5ba55dd55cafc81ef7d52457d16631686.zip |
circleci: enable docker based hive testing
Diffstat (limited to 'circle.yml')
-rw-r--r-- | circle.yml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml new file mode 100644 index 000000000..39ff5d83c --- /dev/null +++ b/circle.yml @@ -0,0 +1,32 @@ +machine: + services: + - docker + +dependencies: + cache_directories: + - "~/.ethash" # Cache the ethash DAG generated by hive for consecutive builds + - "~/.docker" # Cache all docker images manually to avoid lengthy rebuilds + override: + # Restore all previously cached docker images + - mkdir -p ~/.docker + - for img in `ls ~/.docker`; do docker load -i ~/.docker/$img; done + + # Pull in and hive, restore cached ethash DAGs and do a dry run + - go get -u github.com/karalabe/hive + - (cd ~/.go_workspace/src/github.com/karalabe/hive && mkdir -p workspace/ethash/ ~/.ethash) + - (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.ethash/. workspace/ethash/) + - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=NONE --test=. --sim=. --loglevel=6) + + # Cache all the docker images and the ethash DAGs + - for img in `docker images | grep -v "^<none>" | tail -n +2 | awk '{print $1}'`; do docker save $img > ~/.docker/`echo $img | tr '/' ':'`.tar; done + - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/ethash/. ~/.ethash + +test: + override: + # Build Geth and move into a known folder + - make geth + - cp ./build/bin/geth $HOME/geth + + # Run hive and move all generated logs into the public artifacts folder + - (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=go-ethereum:local --override=$HOME/geth --test=. --sim=.) + - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS |