github.com/etsc3259/etsc@v0.0.0-20190109113336-a9c2c10f9c95/circle.yml (about) 1 machine: 2 services: 3 - docker 4 5 dependencies: 6 cache_directories: 7 - "~/.etschash" # Cache the etschash 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 etschash 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/etschash/ ~/.etschash) 17 - (cd ~/.go_workspace/src/github.com/karalabe/hive && cp -r ~/.etschash/. workspace/etschash/) 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 etschash 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/etschash/. ~/.etschash 23 24 test: 25 override: 26 # Build getsc and move into a known folder 27 - make getsc 28 - cp ./build/bin/getsc $HOME/getsc 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-etsc:local --override=$HOME/getsc --test=. --sim=.) 32 - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS