Skip to content

Commit

Permalink
Add mac builds, speed up win builds
Browse files Browse the repository at this point in the history
Closes #65
  • Loading branch information
paultyng committed Sep 4, 2020
1 parent 01a7e95 commit ab42232
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
47 changes: 31 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,20 @@ orbs:
commands:
win_install_go:
steps:
- run: choco install golang --version 1.14.6 --yes
- run:
command: |
choco install golang --version 1.14.6 --yes
go version
macos_install_go:
steps:
- run:
# just latest stable version of Go as a sanity check
# version specification would require a brew update probably
# so this keeps it faster
command: |
brew install golang
go version
go_build:
steps:
- run: go build ./...
Expand All @@ -15,19 +28,24 @@ commands:
- run: go test -v ./...

jobs:
winbuild:
executor:
name: win/default
# combined due to slowness of Go install
macosbuildtest:
macos:
xcode: "11.1.0"
steps:
- macos_install_go
- checkout
- win_install_go
- go_build
wintest:
- go_test

# combined due to slowness of Go install
winbuildtest:
executor:
name: win/default
steps:
- checkout
- win_install_go
- checkout
- go_build
- go_test

go112_build:
Expand Down Expand Up @@ -104,10 +122,8 @@ workflows:
# TODO: add a `nightly` run for checking against TF master branch using TFEXEC_E2ETEST_VERSIONS
pr:
jobs:
- winbuild
- wintest:
requires:
- winbuild
- winbuildtest
- macosbuildtest

# build only for these versions
- go112_build
Expand All @@ -130,10 +146,8 @@ workflows:
- go115_build
release:
jobs:
- winbuild
- wintest:
requires:
- winbuild
- winbuildtest
- macosbuildtest

# build only for these versions
- go112_build
Expand Down Expand Up @@ -175,4 +189,5 @@ workflows:
- go115_test
- go115_vet
- go115_fmt
- wintest
- winbuildtest
- macosbuildtest
4 changes: 2 additions & 2 deletions tfexec/internal/e2etest/show_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,8 @@ func TestShowPlanFile012(t *testing.T) {
runTestVersions(t, []string{testutil.Latest012}, "non_default_planfile_012", func(t *testing.T, tfv *version.Version, tf *tfexec.Terraform) {
// plan file fixture was created in Linux, and is
// not compatible with Windows
if runtime.GOOS == "windows" {
t.Skip("plan file created in 0.12 on Linux is not compatible with Windows")
if runtime.GOOS != "linux" {
t.Skip("plan file created in 0.12 on Linux is not compatible with other OS")
}

providerName := "null"
Expand Down

0 comments on commit ab42232

Please sign in to comment.