github.com/SmartMeshFoundation/Spectrum@v0.0.0-20220621030607-452a266fee1e/circle.yml (about)

     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=Spectrum:local --override=$HOME/geth --test=. --sim=.)
    32      - cp -r ~/.go_workspace/src/github.com/karalabe/hive/workspace/logs/* $CIRCLE_ARTIFACTS