2019-02-27 13:49:16 +00:00
|
|
|
version: 2.1
|
2019-08-30 13:11:32 +00:00
|
|
|
|
2019-02-27 13:49:16 +00:00
|
|
|
executors:
|
2021-08-25 19:21:45 +00:00
|
|
|
go1_17:
|
|
|
|
docker:
|
2022-03-17 13:44:49 +00:00
|
|
|
- image: cimg/go:1.17
|
2022-02-22 16:37:27 +00:00
|
|
|
go1_18:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.18
|
2022-08-08 10:42:49 +00:00
|
|
|
go1_19:
|
|
|
|
docker:
|
|
|
|
- image: cimg/go:1.19
|
2019-02-27 13:49:16 +00:00
|
|
|
|
|
|
|
commands:
|
|
|
|
gomod:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
2022-03-24 11:51:02 +00:00
|
|
|
keys: [deps-v2-]
|
2019-02-27 13:49:16 +00:00
|
|
|
- run:
|
|
|
|
name: Download go module dependencies
|
|
|
|
command: go mod download
|
|
|
|
- save_cache:
|
2022-03-24 11:51:02 +00:00
|
|
|
key: deps-v2-{{ checksum "go.sum" }}-{{ checksum "go.sum" }}
|
2022-03-17 13:44:49 +00:00
|
|
|
paths: [/home/circleci/go/pkg/mod]
|
2019-02-27 13:49:16 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
lint:
|
2022-03-17 13:44:49 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-03-17 10:33:52 +00:00
|
|
|
# TODO: temp workaround, need to upgrade to go1_18 after https://github.com/golangci/golangci-lint/issues/2649 is resolved.
|
|
|
|
executor: go1_17
|
2019-02-27 13:49:16 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- gomod
|
|
|
|
- run:
|
|
|
|
name: go-lint
|
|
|
|
command: |
|
2022-09-02 15:34:55 +00:00
|
|
|
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.49.0
|
2021-05-12 20:25:06 +00:00
|
|
|
make lint
|
2019-02-27 13:49:16 +00:00
|
|
|
|
2022-08-08 10:42:49 +00:00
|
|
|
test_1_17:
|
2022-03-17 13:44:49 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-08-08 10:42:49 +00:00
|
|
|
executor: go1_17
|
2021-03-01 14:22:27 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: git submodule sync
|
|
|
|
- run: git submodule update --init
|
|
|
|
- gomod
|
2022-04-14 11:48:44 +00:00
|
|
|
- run:
|
|
|
|
command: go test -v -race ./...
|
|
|
|
no_output_timeout: 15m
|
2020-04-14 12:06:05 +00:00
|
|
|
|
2022-08-08 10:42:49 +00:00
|
|
|
test_1_18:
|
2022-03-17 13:44:49 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-08-08 10:42:49 +00:00
|
|
|
executor: go1_18
|
2022-02-22 16:37:27 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: git submodule sync
|
|
|
|
- run: git submodule update --init
|
|
|
|
- gomod
|
2022-04-14 11:48:44 +00:00
|
|
|
- run:
|
|
|
|
command: go test -v -race ./...
|
|
|
|
no_output_timeout: 15m
|
2022-02-22 16:37:27 +00:00
|
|
|
|
2022-08-08 10:42:49 +00:00
|
|
|
test_1_19:
|
2022-02-22 16:37:27 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-08-08 10:42:49 +00:00
|
|
|
executor: go1_19
|
2021-08-25 19:21:45 +00:00
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run: git submodule sync
|
|
|
|
- run: git submodule update --init
|
|
|
|
- gomod
|
2022-04-14 11:48:44 +00:00
|
|
|
- run:
|
|
|
|
command: go test -v -race ./...
|
|
|
|
no_output_timeout: 15m
|
2021-08-25 19:21:45 +00:00
|
|
|
|
2019-08-21 16:10:28 +00:00
|
|
|
build_cli:
|
2022-03-17 13:44:49 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-08-08 10:42:49 +00:00
|
|
|
executor: go1_19
|
2019-08-21 16:10:28 +00:00
|
|
|
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:
|
2022-03-17 13:44:49 +00:00
|
|
|
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
|
2022-08-08 10:42:49 +00:00
|
|
|
executor: go1_19
|
2019-08-21 16:10:28 +00:00
|
|
|
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
|
2021-07-07 17:12:32 +00:00
|
|
|
- setup_remote_docker:
|
|
|
|
version: 20.10.6
|
2019-08-21 16:10:28 +00:00
|
|
|
- run:
|
|
|
|
name: Install Docker client
|
|
|
|
command: |
|
|
|
|
set -x
|
2021-07-07 17:12:32 +00:00
|
|
|
VER="20.10.6"
|
|
|
|
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
|
2019-08-21 16:10:28 +00:00
|
|
|
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:
|
|
|
|
- lint:
|
|
|
|
filters:
|
|
|
|
tags:
|
2019-08-21 17:02:43 +00:00
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2022-08-08 10:42:49 +00:00
|
|
|
- test_1_17:
|
2021-03-01 14:22:27 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2022-08-08 10:42:49 +00:00
|
|
|
- test_1_18:
|
2022-02-22 16:37:27 +00:00
|
|
|
filters:
|
|
|
|
tags:
|
|
|
|
only: v/[0-9]+\.[0-9]+\.[0-9]+/
|
2022-08-08 10:42:49 +00:00
|
|
|
- test_1_19:
|
2021-08-25 19:21:45 +00:00
|
|
|
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]+/
|