From 04dffbc2c725493d89d7e95cd3d0e7416b45ba45 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Mon, 7 Oct 2024 14:50:12 +0200 Subject: [PATCH] cirrus: change alt arch task to only compile binaries The current podman-release-%.tar.gz target does a lot more then just checking if we can build for the given arch, in particular it first builds a local podman-remote for the remote-docs.sh script. This makes things slow as we compile several things and then builda and package the docs. Given the docs are not arch specific there is realy no point in doing all that work. All we care about is if the bianries can build on other arches to catch compile issue for otherwise untested arches. This should make the CI Alt Arch. tasks much faster. Signed-off-by: Paul Holzinger --- Makefile | 8 ++++++++ contrib/cirrus/runner.sh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index dc66703fc9..b0e604f407 100644 --- a/Makefile +++ b/Makefile @@ -500,6 +500,14 @@ local-cross: $(CROSS_BUILD_TARGETS) ## Cross compile podman binary for multiple .PHONY: cross cross: local-cross +# Simple target to check that we can build all binaries for another arch, +# the resulting binaries are not meant to be usable this is just for +# testing if it builds, it depends on the caller to set GOOS/GOARCH. +.PHONY: cross-binaries +cross-binaries: + $(MAKE) CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(GOARCH) \ + BUILDTAGS="$(BUILDTAGS_CROSS)" clean-binaries binaries + .PHONY: completions completions: podman podman-remote # key = shell, value = completion filename diff --git a/contrib/cirrus/runner.sh b/contrib/cirrus/runner.sh index 9ffa3b5fed..d69067b025 100755 --- a/contrib/cirrus/runner.sh +++ b/contrib/cirrus/runner.sh @@ -310,7 +310,7 @@ function _run_altbuild() { function _build_altbuild_archs() { for arch in "$@"; do msg "Building release archive for $arch" - showrun make podman-release-${arch}.tar.gz GOARCH=$arch + showrun make cross-binaries GOARCH=$arch done }