ci: skip Alpine builds already published
Build Alpine Packages / build-and-publish (v3.24, 3.24) (pull_request) Canceled after 1h11m37s
Build Alpine Packages / build-and-publish (v3.24, 3.24) (pull_request) Canceled after 1h11m37s
This commit is contained in:
+17
-1
@@ -10,6 +10,7 @@ arches="${ALPINE_ARCHES:-x86_64 aarch64}"
|
||||
packager="${PACKAGER:-local}"
|
||||
selected_packages="${ALPINE_PACKAGE:-${ALPINE_PACKAGES:-}}"
|
||||
skip_build="${ALPINE_SKIP_BUILD:-0}"
|
||||
rust_cache_root="${ALPINE_RUST_CACHE_ROOT:-}"
|
||||
|
||||
if [[ "${skip_build}" == "1" ]]; then
|
||||
printf 'Skipping package build: restored package cache is complete\n'
|
||||
@@ -24,7 +25,7 @@ if [[ "${1:-}" != "--as-builder" && "$(id -u)" == "0" ]]; then
|
||||
printf 'permit nopass :wheel\n' > /etc/doas.d/wheel.conf
|
||||
printf '%%wheel ALL=(ALL) NOPASSWD: ALL\n' > /etc/sudoers.d/wheel
|
||||
chown -R builder:builder "${repo_root}"
|
||||
exec su builder -c "ALPINE_ARCHES='${arches}' ALPINE_REPO_NAME='${repo_name}' ALPINE_PACKAGES='${selected_packages}' PACKAGER='${packager}' '${BASH_SOURCE[0]}' --as-builder"
|
||||
exec su builder -c "ALPINE_ARCHES='${arches}' ALPINE_REPO_NAME='${repo_name}' ALPINE_PACKAGES='${selected_packages}' PACKAGER='${packager}' ALPINE_RUST_CACHE_ROOT='${rust_cache_root}' '${BASH_SOURCE[0]}' --as-builder"
|
||||
fi
|
||||
|
||||
export PACKAGER="${packager}"
|
||||
@@ -72,6 +73,21 @@ while IFS= read -r package_dir; do
|
||||
|
||||
printf 'Building %s for %s\n' "$(basename "${package_dir}")" "${arch}"
|
||||
(
|
||||
package_name="$(apk_package_name "${package_dir}")"
|
||||
if [[ -n "${rust_cache_root}" ]]; then
|
||||
case "${package_name}" in
|
||||
greptimedb)
|
||||
export CARGO_HOME="${rust_cache_root}/greptimedb/cargo"
|
||||
export RUSTUP_HOME="${rust_cache_root}/greptimedb/rustup"
|
||||
export CARGO_TARGET_DIR="${rust_cache_root}/greptimedb/target"
|
||||
;;
|
||||
seaweedfs)
|
||||
export CARGO_HOME="${rust_cache_root}/seaweedfs/cargo"
|
||||
export CARGO_TARGET_DIR="${rust_cache_root}/seaweedfs/target"
|
||||
unset RUSTUP_HOME
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
cd "${package_dir}"
|
||||
ALPINE_ARCH="${arch}" CARCH="${arch}" abuild -r
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user