forked from ethereum/ethereumj
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
44 lines (38 loc) · 2.43 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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)
# Generating DAG
- (cd ~/ethereumj && ./gradlew run -PmainClass=org.ethereum.Start -PjvmArgs="-Dethash.dir=~/.go_workspace/src/github.com/karalabe/hive/workspace/ethash -Dethash.blockNumber=0 -Xmx2G")
# timeout 20 min
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=ethereumj:local --test=NONE --sim=NONE --loglevel=6):
timeout: 1200
# 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
# Cache gradle artifacts
- (cd ~/ethereumj && ./gradlew compileJava)
- (cd ~ && git clone --depth 1 -b develop https://github.com/ether-camp/ethereum-harmony.git)
- (cd ~/ethereum-harmony && ./gradlew dependencyManagement)
test:
override:
# Build app and move into a known folder
- (cd ~/.go_workspace/src/github.com/karalabe/hive/clients/ethereumj\:local && ./build.sh ~/ethereumj ~/ethereum-harmony ~)
# Run hive and move all generated logs into the public artifacts folder
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=ethereumj:local --override=$HOME/harmony.ether.camp.tar --smoke --loglevel=3):
timeout: 4000
- (cd ~/.go_workspace/src/github.com/karalabe/hive && hive --docker-noshell --client=ethereumj:local --override=$HOME/harmony.ether.camp.tar --test=. --loglevel=3):
timeout: 4000
- cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS