2019-02-27 13:49:16 +00:00
|
|
|
version: 2.1
|
2019-08-30 13:11:32 +00:00
|
|
|
orbs:
|
|
|
|
codecov: codecov/codecov@1.0.5
|
|
|
|
|
2019-02-27 13:49:16 +00:00
|
|
|
executors:
|
|
|
|
go1_12:
|
|
|
|
docker:
|
|
|
|
- image: circleci/golang:1.12
|
|
|
|
environment:
|
|
|
|
GO111MODULE: "on"
|
2019-09-09 11:55:49 +00:00
|
|
|
go1_13:
|
|
|
|
docker:
|
|
|
|
- image: circleci/golang:1.13
|
|
|
|
environment:
|
|
|
|
GO111MODULE: "on"
|
2019-02-27 13:49:16 +00:00
|
|
|
|
|
|
|
commands:
|
|
|
|
gomod:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys: [deps-]
|
|
|
|
- run:
|
|
|
|
name: Download go module dependencies
|
|
|
|
command: go mod download
|
|
|
|
- save_cache:
|
|
|
|
key: deps-{{ checksum "go.sum" }}-{{ checksum "go.sum" }}
|
|
|
|
paths: [/go/pkg/mod]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-09-09 11:55:49 +00:00
|
|
|
executor: go1_13
|
2019-02-27 13:49:16 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- gomod
|
|
|
|
- run:
|
|
|
|
name: go-lint
|
|
|
|
command: |
|
|
|
|
go get -u -v golang.org/x/lint/golint
|
|
|
|
golint -set_exit_status ./...
|
|
|
|
|
|
|
|
vet:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-09-09 11:55:49 +00:00
|
|
|
executor: go1_13
|
2019-02-27 13:49:16 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- gomod
|
|
|
|
- run:
|
|
|
|
name: go-vet
|
|
|
|
command: go vet ./...
|
|
|
|
|
|
|
|
test_1_12:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-02-27 13:49:16 +00:00
|
|
|
executor: go1_12
|
2019-09-09 11:55:49 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-12-04 17:36:51 +00:00
|
|
|
- run: git submodule sync
|
|
|
|
- run: git submodule update --init
|
2019-09-09 11:55:49 +00:00
|
|
|
- gomod
|
|
|
|
- run: go test -v -race ./...
|
|
|
|
|
|
|
|
test_1_13:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-09-09 11:55:49 +00:00
|
|
|
executor: go1_13
|
2019-02-27 13:49:16 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-12-04 17:36:51 +00:00
|
|
|
- run: git submodule sync
|
|
|
|
- run: git submodule update --init
|
2019-02-27 13:49:16 +00:00
|
|
|
- gomod
|
2019-08-30 13:11:32 +00:00
|
|
|
- run: go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic
|
|
|
|
- codecov/upload:
|
|
|
|
file: coverage.txt
|
2019-02-27 13:49:16 +00:00
|
|
|
|
2019-08-21 16:10:28 +00:00
|
|
|
build_cli:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-08-21 16:10:28 +00:00
|
|
|
executor: go1_12
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- gomod
|
|
|
|
- run: make build
|
2019-08-29 15:41:53 +00:00
|
|
|
- store_artifacts:
|
|
|
|
path: bin
|
|
|
|
destination: /
|
2019-08-21 16:10:28 +00:00
|
|
|
|
|
|
|
build_image:
|
2020-03-03 14:21:42 +00:00
|
|
|
working_directory: /go/src/github.com/nspcc-dev/neo-go
|
2019-08-21 16:10:28 +00:00
|
|
|
executor: go1_12
|
|
|
|
docker:
|
2019-11-15 18:18:09 +00:00
|
|
|
- image: golang:1-alpine
|
2019-08-21 16:10:28 +00:00
|
|
|
steps:
|
|
|
|
- run: apk update && apk add git make curl tar
|
|
|
|
- checkout
|
2019-11-15 18:18:09 +00:00
|
|
|
- gomod
|
2019-08-21 16:10:28 +00:00
|
|
|
- setup_remote_docker
|
|
|
|
- run:
|
|
|
|
name: Install Docker client
|
|
|
|
command: |
|
|
|
|
set -x
|
|
|
|
VER="17.03.0-ce"
|
|
|
|
curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
|
|
|
|
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
|
|
|
|
mv /tmp/docker/* /usr/bin
|
2019-08-29 12:48:05 +00:00
|
|
|
- run: make image
|
2019-08-21 16:10:28 +00:00
|
|
|
|
|
|
|
|
2019-02-27 13:49:16 +00:00
|
|
|
workflows:
|
2019-08-29 12:28:20 +00:00
|
|
|
version: 2
|
2019-02-27 13:49:16 +00:00
|
|
|
workflow:
|
|
|
|
jobs:
|
|
|
|
- vet:
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2019-02-27 13:49:16 +00:00
|
|
|
- lint:
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2019-02-27 13:49:16 +00:00
|
|
|
- test_1_12:
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2019-09-09 11:55:49 +00:00
|
|
|
- test_1_13:
|
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2019-08-21 16:10:28 +00:00
|
|
|
- build_cli:
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2019-08-21 16:10:28 +00:00
|
|
|
- build_image:
|
|
|
|
requires:
|
|
|
|
- build_cli
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|