neo-go/.circleci/config.yml

141 lines
3.5 KiB
YAML
Raw Normal View History

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-03-01 14:22:27 +00:00
go1_16:
docker:
- image: cimg/go:1.16
2021-03-01 14:22:27 +00:00
environment:
GO111MODULE: "on"
go1_17:
docker:
- image: cimg/go:1.17
go1_18:
docker:
- image: cimg/go:1.18
2019-02-27 13:49:16 +00:00
commands:
gomod:
steps:
- restore_cache:
keys: [deps-v2-]
2019-02-27 13:49:16 +00:00
- run:
name: Download go module dependencies
command: go mod download
- save_cache:
key: deps-v2-{{ checksum "go.sum" }}-{{ checksum "go.sum" }}
paths: [/home/circleci/go/pkg/mod]
2019-02-27 13:49:16 +00:00
jobs:
lint:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
# 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: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.44.2
make lint
2019-02-27 13:49:16 +00:00
test_1_16:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
executor: go1_16
2021-03-01 14:22:27 +00:00
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- gomod
- run:
command: go test -v -race ./...
no_output_timeout: 15m
test_1_17:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
executor: go1_17
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- gomod
- run:
command: go test -v -race ./...
no_output_timeout: 15m
test_1_18:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
executor: go1_18
steps:
- checkout
- run: git submodule sync
- run: git submodule update --init
- gomod
- run:
command: go test -v -race ./...
no_output_timeout: 15m
build_cli:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
executor: go1_18
steps:
- checkout
- gomod
- run: make build
- store_artifacts:
path: bin
destination: /
build_image:
working_directory: /home/circleci/go/src/github.com/nspcc-dev/neo-go
executor: go1_18
docker:
- image: golang:1-alpine
steps:
- run: apk update && apk add git make curl tar
- checkout
- gomod
- setup_remote_docker:
version: 20.10.6
- run:
name: Install Docker client
command: |
set -x
VER="20.10.6"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run: make image
2019-02-27 13:49:16 +00:00
workflows:
version: 2
2019-02-27 13:49:16 +00:00
workflow:
jobs:
- lint:
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/
- test_1_16:
2021-03-01 14:22:27 +00:00
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/
- test_1_17:
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/
- test_1_18:
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/
- build_cli:
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/
- build_image:
requires:
- build_cli
filters:
tags:
only: v/[0-9]+\.[0-9]+\.[0-9]+/