|
|
|
@ -1,5 +1,9 @@
|
|
|
|
|
version: 2
|
|
|
|
|
|
|
|
|
|
env-shared: &env-shared
|
|
|
|
|
environment:
|
|
|
|
|
GOFLAGS: "-mod=vendor"
|
|
|
|
|
|
|
|
|
|
build-shared: &build-shared
|
|
|
|
|
steps:
|
|
|
|
|
- checkout
|
|
|
|
@ -16,12 +20,12 @@ build-shared: &build-shared
|
|
|
|
|
- run:
|
|
|
|
|
name: Run tests
|
|
|
|
|
command: |
|
|
|
|
|
go test -v -mod=vendor ./...
|
|
|
|
|
go test -v ./...
|
|
|
|
|
- run:
|
|
|
|
|
name: Compile project on every platform
|
|
|
|
|
command: |
|
|
|
|
|
go get github.com/mitchellh/gox
|
|
|
|
|
GOFLAGS=-mod=vendor gox -parallel 10 -os "linux freebsd" -osarch "darwin/i386 darwin/amd64"
|
|
|
|
|
gox -parallel 10 -os "linux freebsd" -osarch "darwin/i386 darwin/amd64"
|
|
|
|
|
- save_cache:
|
|
|
|
|
key: pkg-cache-{{ checksum "go.sum" }}-v5
|
|
|
|
|
paths:
|
|
|
|
@ -29,14 +33,17 @@ build-shared: &build-shared
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
"golang:1.12":
|
|
|
|
|
<<: *env-shared
|
|
|
|
|
<<: *build-shared
|
|
|
|
|
docker:
|
|
|
|
|
- image: circleci/golang:1.12
|
|
|
|
|
"golang:latest":
|
|
|
|
|
<<: *env-shared
|
|
|
|
|
<<: *build-shared
|
|
|
|
|
docker:
|
|
|
|
|
- image: circleci/golang:latest
|
|
|
|
|
release:
|
|
|
|
|
<<: *env-shared
|
|
|
|
|
docker:
|
|
|
|
|
- image: circleci/golang:1.12
|
|
|
|
|
steps:
|
|
|
|
|