Skip to content

Commit

Permalink
cirrus: change alt arch task to only compile binaries
Browse files Browse the repository at this point in the history
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 <pholzing@redhat.com>
  • Loading branch information
Luap99 committed Oct 7, 2024
1 parent d1bbe6a commit 5812f8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 useable 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
Expand Down
2 changes: 1 addition & 1 deletion contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,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
}

Expand Down

0 comments on commit 5812f8e

Please sign in to comment.