mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 11:32:09 +00:00
da20785685
Former-commit-id: 23f542f43b4b493e38f5aa4c29788ed93a63b43b [formerly 71b23a6a28eb045fcfeab6329de69f1e5455486b] Former-commit-id: d12b3a6decc876f010a71f98e11df7387c1aaf2a
33 lines
1.5 KiB
YAML
33 lines
1.5 KiB
YAML
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
|