mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 14:24:39 +00:00
commit
fdee4bc417
@ -22,6 +22,43 @@ references:
|
|||||||
GIT_COMMITTER_NAME: circleci-consul
|
GIT_COMMITTER_NAME: circleci-consul
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# 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 tools
|
||||||
|
- run: ./build-support/scripts/build-local.sh
|
||||||
|
|
||||||
|
# save dev build to CircleCI
|
||||||
|
- store_artifacts:
|
||||||
|
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:
|
dev-build:
|
||||||
docker:
|
docker:
|
||||||
- image: *GOLANG_IMAGE
|
- image: *GOLANG_IMAGE
|
||||||
@ -30,10 +67,6 @@ jobs:
|
|||||||
- checkout
|
- checkout
|
||||||
- run: make dev
|
- run: make dev
|
||||||
|
|
||||||
# save dev build to CircleCI
|
|
||||||
- store_artifacts:
|
|
||||||
path: /go/bin/consul
|
|
||||||
|
|
||||||
# save dev build to pass to downstream jobs
|
# save dev build to pass to downstream jobs
|
||||||
- persist_to_workspace:
|
- persist_to_workspace:
|
||||||
root: /go/bin
|
root: /go/bin
|
||||||
@ -178,6 +211,11 @@ jobs:
|
|||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
version: 2
|
version: 2
|
||||||
|
build-distros:
|
||||||
|
jobs:
|
||||||
|
- build-386
|
||||||
|
- build-amd64
|
||||||
|
- build-arm-arm64
|
||||||
test-integrations:
|
test-integrations:
|
||||||
jobs:
|
jobs:
|
||||||
- dev-build
|
- dev-build
|
||||||
|
@ -367,7 +367,8 @@ function build_consul_local {
|
|||||||
# If the XC_OS or the XC_ARCH environment vars are present then only those platforms/architectures
|
# If the XC_OS or the XC_ARCH environment vars are present then only those platforms/architectures
|
||||||
# will be built. Otherwise all supported platform/architectures are built
|
# will be built. Otherwise all supported platform/architectures are built
|
||||||
# The NOGOX environment variable will be used if present. This will prevent using gox and instead
|
# The NOGOX environment variable will be used if present. This will prevent using gox and instead
|
||||||
# build with go install
|
# build with go install.
|
||||||
|
# The GOXPARALLEL environment variable is used if set
|
||||||
|
|
||||||
if ! test -d "$1"
|
if ! test -d "$1"
|
||||||
then
|
then
|
||||||
@ -427,6 +428,7 @@ function build_consul_local {
|
|||||||
-arch="${build_arch}" \
|
-arch="${build_arch}" \
|
||||||
-osarch="!darwin/arm !darwin/arm64 !freebsd/arm" \
|
-osarch="!darwin/arm !darwin/arm64 !freebsd/arm" \
|
||||||
-ldflags="${GOLDFLAGS}" \
|
-ldflags="${GOLDFLAGS}" \
|
||||||
|
-parallel="${GOXPARALLEL:-"-1"}" \
|
||||||
-output "pkg.bin.new/${extra_dir}{{.OS}}_{{.Arch}}/consul" \
|
-output "pkg.bin.new/${extra_dir}{{.OS}}_{{.Arch}}/consul" \
|
||||||
-tags="${GOTAGS}" \
|
-tags="${GOTAGS}" \
|
||||||
.
|
.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user