ci: proper build matrix using workflows

reference: https://discuss.circleci.com/t/build-matrix-configuration/14448
This commit is contained in:
Dawid Dziurla 2019-09-04 18:14:39 +02:00
parent d4b237308a
commit 139d991f45
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

View file

@ -1,9 +1,6 @@
version: 2 version: 2
jobs:
build: build-shared: &build-shared
docker:
- image: circleci/golang:1.12
- image: circleci/golang:latest
steps: steps:
- checkout - checkout
- run: - run:
@ -30,6 +27,15 @@ jobs:
paths: paths:
- ~/.cache/go-build - ~/.cache/go-build
jobs:
"golang:1.12":
<<: *build-shared
docker:
- image: circleci/golang:1.12
"golang:latest":
<<: *build-shared
docker:
- image: circleci/golang:latest
release: release:
docker: docker:
- image: circleci/golang:1.12 - image: circleci/golang:1.12
@ -62,7 +68,8 @@ workflows:
version: 2 version: 2
build: build:
jobs: jobs:
- build - "golang:1.12"
- "golang:latest"
release: release:
jobs: jobs:
- release: - release: