diff --git a/.circleci/config.yml b/.circleci/config.yml index 9749f00356..486cea1acd 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,17 +22,50 @@ references: GIT_COMMITTER_NAME: circleci-consul jobs: - dev-build: + # build all distros + build-distros: &build-distros docker: - image: *GOLANG_IMAGE + environment: &build-env + GOXPARALLEL: 2 # CircleCI containers are 2 CPU x 4GB RAM working_directory: /go/src/github.com/hashicorp/consul steps: - checkout - - run: make dev + - run: make tools + - run: ./build-support/scripts/build-local.sh # save dev build to CircleCI - store_artifacts: - path: /go/bin/consul + path: ./pkg/bin + + build-386: + <<: *build-distros + environment: + <<: *build-env + XC_OS: "darwin freebsd linux windows" + XC_ARCH: "386" + + build-amd64: + <<: *build-distros + environment: + <<: *build-env + XC_OS: "darwin freebsd linux solaris windows" + XC_ARCH: "amd64" + + build-arm-arm64: + <<: *build-distros + environment: + <<: *build-env + XC_OS: linux + XC_ARCH: "arm arm64" + + dev-build: + docker: + - image: *GOLANG_IMAGE + working_directory: /go/src/github.com/hashicorp/consul + steps: + - checkout + - run: make dev # save dev build to pass to downstream jobs - persist_to_workspace: @@ -178,6 +211,11 @@ jobs: workflows: version: 2 + build-distros: + jobs: + - build-386 + - build-amd64 + - build-arm-arm64 test-integrations: jobs: - dev-build