From c1f203a1b8f78584d19cd6c55e30d72f0f5215ee Mon Sep 17 00:00:00 2001 From: Julien Pivotto Date: Sat, 20 Mar 2021 18:10:04 +0100 Subject: [PATCH] Use CircleCI parallelism This commit uses the CircleCI parallelism features, combined with the last changes in promu that enables this. Now all the pull requests will be built with all the platforms again, in less than 20 minutes. A side effect is that we now build Prometheus for 7 more os/arch combos: darwin-arm64 / illumos-amd64 / linux-mips / linux-mipsle / freebsd-arm64 / netbsd-arm64 / openbsd-arm64 Signed-off-by: Julien Pivotto --- .circleci/config.yml | 37 +++++-------------------------------- .promu.yml | 30 ++++++++---------------------- Makefile.common | 2 +- 3 files changed, 14 insertions(+), 55 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 609019c32..bd068ef47 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: - prometheus: prometheus/prometheus@0.10.0 + prometheus: prometheus/prometheus@0.11.0 go: circleci/go@0.2.0 win: circleci/windows@2.3.0 @@ -132,44 +132,17 @@ workflows: filters: tags: only: /.*/ - # Build pipeline for PRs. - - prometheus/build_platform: + - prometheus/build: name: build - filters: - tags: - only: /.*/ - ignore: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ - matrix: - parameters: - platform: - # - aix # Currently doesn't build. - - darwin - - dragonfly - - freebsd - - illumos - - linux - - netbsd - - openbsd - - windows - # Build pipeline for main releases. - - prometheus/build: - name: build-main - filters: - branches: - only: main - # Build pipeline for versioned releases. - - prometheus/build: - name: build-release + parallelism: 12 filters: tags: only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ - branches: - ignore: /.*/ - prometheus/publish_main: context: org-context requires: - test - - build-main + - build filters: branches: only: main @@ -178,7 +151,7 @@ workflows: context: org-context requires: - test - - build-release + - build filters: tags: only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ diff --git a/.promu.yml b/.promu.yml index d94614656..f52a646de 100644 --- a/.promu.yml +++ b/.promu.yml @@ -27,25 +27,11 @@ tarball: - npm_licenses.tar.bz2 crossbuild: platforms: - - linux/amd64 - - linux/386 - - darwin/amd64 - - windows/amd64 - - windows/386 - - freebsd/amd64 - - freebsd/386 - - openbsd/amd64 - - openbsd/386 - - netbsd/amd64 - - netbsd/386 - - dragonfly/amd64 - - linux/arm - - linux/arm64 - - freebsd/arm - - openbsd/arm - - linux/mips64 - - linux/mips64le - - netbsd/arm - - linux/ppc64 - - linux/ppc64le - - linux/s390x + - darwin + - dragonfly + - freebsd + - illumos + - linux + - netbsd + - openbsd + - windows diff --git a/Makefile.common b/Makefile.common index fea110394..86b2870a9 100644 --- a/Makefile.common +++ b/Makefile.common @@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),) endif endif -PROMU_VERSION ?= 0.10.0 +PROMU_VERSION ?= 0.11.1 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz GOLANGCI_LINT :=