testing circle ci for mac (#7054)

This commit is contained in:
Steven Soroka 2020-02-20 17:23:13 -05:00 committed by GitHub
parent cf0667264a
commit 82a358b910
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 51 additions and 2 deletions

View File

@ -12,6 +12,13 @@ defaults:
go-1_13: &go-1_13 go-1_13: &go-1_13
docker: docker:
- image: 'quay.io/influxdb/telegraf-ci:1.13.5' - image: 'quay.io/influxdb/telegraf-ci:1.13.5'
mac: &mac
macos:
xcode: 11.3.1
working_directory: '~/go/src/github.com/influxdata/telegraf'
environment:
HOMEBREW_NO_AUTO_UPDATE: 1
GOFLAGS: -p=8
version: 2 version: 2
jobs: jobs:
@ -32,6 +39,30 @@ jobs:
root: '/go' root: '/go'
paths: paths:
- '*' - '*'
macdeps:
<<: [ *mac ]
steps:
- checkout
- restore_cache:
key: mac-go-mod-v1-{{ checksum "go.sum" }}
- run: 'brew install go@1.13'
- run: 'make deps'
- run: 'make tidy'
- save_cache:
name: 'go module cache'
key: mac-go-mod-v1-{{ checksum "go.sum" }}
paths:
- '~/go/pkg/mod'
- '/usr/local/Cellar/go'
- '/usr/local/bin/go'
- '/usr/local/bin/gofmt'
- persist_to_workspace:
root: '/'
paths:
- 'usr/local/bin/go'
- 'usr/local/Cellar/go'
- 'usr/local/bin/gofmt'
- 'Users/distiller/go'
test-go-1.12: test-go-1.12:
<<: [ *defaults, *go-1_12 ] <<: [ *defaults, *go-1_12 ]
@ -65,6 +96,14 @@ jobs:
- run: 'GOARCH=386 make' - run: 'GOARCH=386 make'
- run: 'GOARCH=386 make check' - run: 'GOARCH=386 make check'
- run: 'GOARCH=386 make test' - run: 'GOARCH=386 make test'
test-go-1.13-darwin:
<<: [ *mac ]
steps:
- attach_workspace:
at: '/'
- run: 'make'
- run: 'make check'
- run: 'make test'
package: package:
<<: [ *defaults, *go-1_13 ] <<: [ *defaults, *go-1_13 ]
@ -98,6 +137,10 @@ workflows:
version: 2 version: 2
check: check:
jobs: jobs:
- 'macdeps':
filters:
tags:
only: /.*/
- 'deps': - 'deps':
filters: filters:
tags: tags:
@ -126,6 +169,12 @@ workflows:
filters: filters:
tags: tags:
only: /.*/ only: /.*/
- 'test-go-1.13-darwin':
requires:
- 'macdeps'
filters:
tags: # only runs on tags if you specify this filter
only: /.*/
- 'package': - 'package':
requires: requires:
- 'test-go-1.12' - 'test-go-1.12'