From 35b49230eb7ee37f96ed8b5dfcb04cd8a0e75eec Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Wed, 17 Mar 2021 20:14:54 +0100 Subject: [PATCH] Speed up PR builds * Update to latest promu. * Split up builds for PRs into a build matrix. * Keep non-matrix build pipeline for releases. Signed-off-by: Ben Kochie --- .circleci/config.yml | 36 ++++++++++++++++++++++++++++++++---- Makefile.common | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 404836685..609019c32 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.1 orbs: - prometheus: prometheus/prometheus@0.9.0 + prometheus: prometheus/prometheus@0.10.0 go: circleci/go@0.2.0 win: circleci/windows@2.3.0 @@ -132,16 +132,44 @@ workflows: filters: tags: only: /.*/ - - prometheus/build: + # Build pipeline for PRs. + - prometheus/build_platform: 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 + filters: + tags: + only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ + branches: + ignore: /.*/ - prometheus/publish_main: context: org-context requires: - test - - build + - build-main filters: branches: only: main @@ -150,7 +178,7 @@ workflows: context: org-context requires: - test - - build + - build-release filters: tags: only: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ diff --git a/Makefile.common b/Makefile.common index 2b73d86a6..fea110394 100644 --- a/Makefile.common +++ b/Makefile.common @@ -78,7 +78,7 @@ ifneq ($(shell which gotestsum),) endif endif -PROMU_VERSION ?= 0.7.0 +PROMU_VERSION ?= 0.10.0 PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz GOLANGCI_LINT :=