Split up alt binaries to speed up build

Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
This commit is contained in:
Jason T. Greene 2023-09-08 23:05:38 -05:00
parent 7bf9f302a3
commit c2cd93cdc2
2 changed files with 65 additions and 13 deletions

View File

@ -369,7 +369,15 @@ alt_build_task:
- env: - env:
ALT_NAME: 'Windows Cross' ALT_NAME: 'Windows Cross'
- env: - env:
ALT_NAME: 'Alt Arch. Cross' ALT_NAME: 'Alt Arch. x86 Cross'
- env:
ALT_NAME: 'Alt Arch. ARM Cross'
- env:
ALT_NAME: 'Alt Arch. MIPS Cross'
- env:
ALT_NAME: 'Alt Arch. MIPS64 Cross'
- env:
ALT_NAME: 'Alt Arch. Other Cross'
# This task cannot make use of the shared repo.tbz artifact. # This task cannot make use of the shared repo.tbz artifact.
clone_script: *full_clone clone_script: *full_clone
setup_script: *setup setup_script: *setup
@ -1067,10 +1075,34 @@ artifacts_task:
- $ARTCURL/Build%20for%20${FEDORA_NAME}/repo/repo.tbz - $ARTCURL/Build%20for%20${FEDORA_NAME}/repo/repo.tbz
- tar xjf repo.tbz - tar xjf repo.tbz
- cp ./bin/* $CIRRUS_WORKING_DIR/ - cp ./bin/* $CIRRUS_WORKING_DIR/
alt_binaries_script: alt_binaries_intel_script:
- mkdir -p /tmp/alt - mkdir -p /tmp/alt
- cd /tmp/alt - cd /tmp/alt
- $ARTCURL/Alt%20Arch.%20Cross/repo/repo.tbz - $ARTCURL/Alt%20Arch.%20x86%20Cross/repo/repo.tbz
- tar xjf repo.tbz
- mv ./*.tar.gz $CIRRUS_WORKING_DIR/
alt_binaries_arm_script:
- mkdir -p /tmp/alt
- cd /tmp/alt
- $ARTCURL/Alt%20Arch.%20ARM%20Cross/repo/repo.tbz
- tar xjf repo.tbz
- mv ./*.tar.gz $CIRRUS_WORKING_DIR/
alt_binaries_mips_script:
- mkdir -p /tmp/alt
- cd /tmp/alt
- $ARTCURL/Alt%20Arch.%20MIPS%20Cross/repo/repo.tbz
- tar xjf repo.tbz
- mv ./*.tar.gz $CIRRUS_WORKING_DIR/
alt_binaries_mips64_script:
- mkdir -p /tmp/alt
- cd /tmp/alt
- $ARTCURL/Alt%20Arch.%20MIPS64%20Cross/repo/repo.tbz
- tar xjf repo.tbz
- mv ./*.tar.gz $CIRRUS_WORKING_DIR/
alt_binaries_other_script:
- mkdir -p /tmp/alt
- cd /tmp/alt
- $ARTCURL/Alt%20Arch.%20Other%20Cross/repo/repo.tbz
- tar xjf repo.tbz - tar xjf repo.tbz
- mv ./*.tar.gz $CIRRUS_WORKING_DIR/ - mv ./*.tar.gz $CIRRUS_WORKING_DIR/
win_binaries_script: win_binaries_script:

View File

@ -278,28 +278,48 @@ function _run_altbuild() {
*RPM*) *RPM*)
make package make package
;; ;;
Alt*Cross) Alt*x86*Cross)
arches=(\ arches=(\
amd64 amd64
ppc64le 386)
_build_altbuild_archs "${arches[@]}"
;;
Alt*ARM*Cross)
arches=(\
arm arm
arm64 arm64)
386 _build_altbuild_archs "${arches[@]}"
s390x ;;
Alt*Other*Cross)
arches=(\
ppc64le
s390x)
_build_altbuild_archs "${arches[@]}"
;;
Alt*MIPS*Cross)
arches=(\
mips mips
mipsle mipsle)
_build_altbuild_archs "${arches[@]}"
;;
Alt*MIPS64*Cross*)
arches=(\
mips64 mips64
mips64le) mips64le)
for arch in "${arches[@]}"; do _build_altbuild_archs "${arches[@]}"
msg "Building release archive for $arch"
make podman-release-${arch}.tar.gz GOARCH=$arch
done
;; ;;
*) *)
die "Unknown/Unsupported \$$ALT_NAME '$ALT_NAME'" die "Unknown/Unsupported \$$ALT_NAME '$ALT_NAME'"
esac esac
} }
function _build_altbuild_archs() {
for arch in "$@"; do
msg "Building release archive for $arch"
make podman-release-${arch}.tar.gz GOARCH=$arch
done
}
function _run_release() { function _run_release() {
msg "podman info:" msg "podman info:"
bin/podman info bin/podman info