-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #365 from CircleCI-Public/mac
Build on macOS
- Loading branch information
Showing
3 changed files
with
37 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,12 @@ executors: | |
- image: circleci/golang:1.12.15 | ||
environment: | ||
CGO_ENABLED: 0 | ||
mac: | ||
macos: | ||
xcode: 11.3.1 | ||
environment: | ||
CGO_ENABLED: 0 | ||
HOMEBREW_NO_AUTO_UPDATE: 1 | ||
|
||
commands: | ||
build-docker-image: | ||
|
@@ -56,13 +62,15 @@ commands: | |
gomod: | ||
steps: | ||
- restore_cache: | ||
keys: [v1-gomod-] | ||
keys: ["v2-gomod-{{ arch }}-"] | ||
- run: | ||
name: Download go module dependencies | ||
command: go mod download | ||
- save_cache: | ||
key: v1-gomod-{{ checksum "go.sum" }} | ||
paths: [/go/pkg/mod] | ||
key: v2-gomod-{{ arch }}-{{ checksum "go.sum" }} | ||
paths: | ||
- /go/pkg/mod # Linux | ||
- ~/go/pkg/mod # macOS | ||
# Wrap the slack/status command to only notify on failures | ||
slack-notify-on-failure: | ||
steps: | ||
|
@@ -71,6 +79,16 @@ commands: | |
only_for_branch: "master" | ||
|
||
jobs: | ||
test_mac: | ||
executor: mac | ||
steps: | ||
- checkout | ||
- run: | | ||
brew install [email protected] | ||
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.bash_profile | ||
- gomod | ||
- run: make test | ||
- slack-notify-on-failure | ||
test: | ||
executor: go | ||
steps: | ||
|
@@ -217,6 +235,7 @@ workflows: | |
- shellcheck/check: | ||
exclude: ./vendor/* | ||
- test | ||
- test_mac | ||
- coverage | ||
- lint | ||
- deploy-test | ||
|
@@ -229,6 +248,7 @@ workflows: | |
- deploy: | ||
requires: | ||
- test | ||
- test_mac | ||
- coverage | ||
- lint | ||
- deploy-test | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters