mirror of
https://github.com/containers/podman.git
synced 2025-10-25 02:04:43 +08:00
Cross-build release-archives w/ arch in filename
Fixes #11417 Cross-building the podman-remote documentation requires a functional native architecture executable. However `make` only deals with files/timestamps, it doesn't understand if an existing binary will function on the system or not. This makes building cross-platform releases incredibly accident-prone and fragile. A practical way to deal with this, is via multiple conditional (nested) `make` calls along with careful manipulation of `$GOOS` and `$GOARCH`. Also, when cross-building releases be kind to humans and cleanup any non-native binaries left behind. Update the `Alt Arch. Cross` Cirrus-CI task to build release archives for all Linux architectures supported by golang and podman. Update the `OSX Cross` task to additionally build for the M1 (arm64) architecture. Finally, update the release process documentation to reflect the new locations (Cirrus-CI task names) for the release archives. Include a note about additional manual work being required to produce the signed `.dmg` file for MacOS. Signed-off-by: Chris Evich <cevich@redhat.com>
This commit is contained in:
@ -205,10 +205,12 @@ function _run_build() {
|
||||
# Ensure always start from clean-slate with all vendor modules downloaded
|
||||
make clean
|
||||
make vendor
|
||||
make podman-release.tar.gz # includes podman, podman-remote, and docs
|
||||
make podman-release # includes podman, podman-remote, and docs
|
||||
}
|
||||
|
||||
function _run_altbuild() {
|
||||
local -a arches
|
||||
local arch
|
||||
req_env_vars ALT_NAME
|
||||
# Defined in .cirrus.yml
|
||||
# shellcheck disable=SC2154
|
||||
@ -221,7 +223,7 @@ function _run_altbuild() {
|
||||
make build-all-new-commits GIT_BASE_BRANCH=origin/$DEST_BRANCH
|
||||
;;
|
||||
*Windows*)
|
||||
make podman-remote-release-windows.zip
|
||||
make podman-remote-release-windows_amd64.zip
|
||||
make podman.msi
|
||||
;;
|
||||
*Without*)
|
||||
@ -232,7 +234,21 @@ function _run_altbuild() {
|
||||
rpmbuild --rebuild ./podman-*.src.rpm
|
||||
;;
|
||||
Alt*Cross)
|
||||
make local-cross
|
||||
arches=(\
|
||||
amd64
|
||||
ppc64le
|
||||
arm
|
||||
arm64
|
||||
386
|
||||
s390x
|
||||
mips
|
||||
mipsle
|
||||
mips64
|
||||
mips64le)
|
||||
for arch in "${arches[@]}"; do
|
||||
msg "Building release archive for $arch"
|
||||
make podman-release-${arch}.tar.gz GOARCH=$arch
|
||||
done
|
||||
;;
|
||||
*Static*)
|
||||
req_env_vars CTR_FQIN
|
||||
|
||||
Reference in New Issue
Block a user