From 86b7e05ebee8c8d24d481364411b3879c8a8f23b Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Wed, 1 May 2019 13:50:57 +0200 Subject: [PATCH] circle-ci: build each support GOOS in a separate run using vendors to make this faster make bin can take more than 10min --- .circleci/config.yml | 49 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 8 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 14319455f..4be0bbc2c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,27 +1,60 @@ +defaults: &golang + docker: + - image: circleci/golang:1.12 + working_directory: /go/src/github.com/hashicorp/packer + steps: + - checkout + - run: go build -o pkg/packer . + # Golang CircleCI 2.0 configuration file # # Check https://circleci.com/docs/2.0/language-go/ for more details version: 2 jobs: build: - docker: - - image: circleci/golang:1.12 - working_directory: /go/src/github.com/hashicorp/packer + <<: *golang steps: - checkout - run: make ci check-vendor-vs-mod: - docker: - - image: circleci/golang:1.12 - working_directory: /go/src/github.com/hashicorp/packer + <<: *golang steps: - checkout - run: GO111MODULE=on go run . --help - - run: GO111MODULE=on make bin - run: make check-vendor-vs-mod + build_linux: + <<: *golang + environment: + GOOS: linux + build_windows: + <<: *golang + environment: + GOOS: windows + build_darwin: + <<: *golang + environment: + GOOS: darwin + build_freebsd: + <<: *golang + environment: + GOOS: freebsd + build_solaris: + <<: *golang + environment: + GOOS: solaris + build_openbsd: + <<: *golang + environment: + GOOS: openbsd workflows: version: 2 build_and_check_vendor_vs_module: jobs: - build - - check-vendor-vs-mod \ No newline at end of file + - check-vendor-vs-mod + - build_linux + - build_darwin + - build_windows + - build_freebsd + - build_openbsd + \ No newline at end of file