erigon-pulse/.circleci/config.yml
Alex Sharov 717b096afc
[wip] Cache z3 build on CI, up golangci-lint to v1.27.0 (#615)
* z3 build cache

* z3 build cache

* circle 2.1 version

* golangci-lint up to v1.27.0

* separate z3 cache, add architecture to the key

* separate z3 cache, add architecture to the key

* rerun ci

* rerun ci

* rerun ci

* fix z3 cache

* fix z3 cache

* fix z3 cache

* try shorter

* trigger ci
2020-06-04 09:54:17 +01:00

66 lines
1.9 KiB
YAML

version: 2.1
jobs:
build:
docker:
- image: circleci/golang:1.13.4
resource_class: medium
working_directory: /go/src/github.com/ledgerwatch/turbo-geth
steps:
- run:
name: "Setup custom environment variables"
command: |
echo 'export GO111MODULE="on"' >> $BASH_ENV
echo 'export TEST_RESULTS="/tmp/test-results"' >> $BASH_ENV
source $BASH_ENV
- checkout
- run: mkdir -p ${TEST_RESULTS}
- run: go env
- run: git submodule update --init --recursive
- run: git submodule status semantics/z3 | awk '{ print $1 }' > /tmp/z3.version
- restore_cache:
keys:
- v1-pkg-cache-{{ arch }}-{{ checksum "go.sum" }}
- restore_cache:
keys:
- v1-z3-cache-{{ arch }}-{{ checksum "/tmp/z3.version" }}
- run: go mod tidy && test -z "$(git status --porcelain)"
- run: go mod download
- run: go mod verify
- run: go get github.com/jstemmer/go-junit-report
- run: make lintci-deps
- run:
name: Run extra linters
command: make lintci
no_output_timeout: 10m
- run: make
- run:
name: Run unit tests
command: |
trap "go-junit-report <${TEST_RESULTS}/go-test.out > ${TEST_RESULTS}/go-test-report.xml" EXIT
make test | tee ${TEST_RESULTS}/go-test.out
no_output_timeout: 10m
- save_cache:
key: v1-pkg-cache-{{ arch }}-{{ checksum "go.sum" }}
paths: "/go/pkg/mod"
- save_cache:
key: v1-z3-cache-{{ arch }}-{{ checksum "/tmp/z3.version" }}
paths: "/go/src/github.com/ledgerwatch/turbo-geth/semantics/z3/build"
- store_artifacts:
path: /tmp/test-results
destination: raw-test-output
- store_test_results:
path: /tmp/test-results