scripts: unify Linux native builds and retain restore caches [CI]
Build musl and glibc for amd64 and arm64 through one native package path. Reuse musl outputs for OCI images and OpenWrt installers, and export binaries inside a rootless unshare session. Restore the executable dependency graph into a shared persistent NuGet cache, build managed dependencies once, and run isolated native publishes in parallel. Clean temporary outputs and expired image layers under store locks, retire inactive legacy stores after seven days, and retain two toolchain exports. Add regression coverage for staging, extraction, packaging and cleanup boundaries.
This commit is contained in:
1 parent
4515d7b075
commit
490b008a57
28 files changed
+712
-535
No files matched your search
+6
-2
@@ -4,15 +4,19 @@
|
||||
moshiro_setup_buildah() {
|
||||
local store_home="${1:?Buildah cache directory is required}"
|
||||
local config="$store_home/.config/containers/moshiro-storage.conf"
|
||||
local key runroot
|
||||
local key runroot temporary_config
|
||||
key="$(printf '%s' "$store_home" | sha256sum | cut -c1-16)"
|
||||
runroot="${XDG_RUNTIME_DIR:-/tmp}/moshiro-buildah-$(id -u)/$key"
|
||||
mkdir -p "$store_home/.local/share/containers/storage" "$(dirname "$config")" "$runroot"
|
||||
temporary_config="$(mktemp "$(dirname "$config")/moshiro-storage.XXXXXX")"
|
||||
(
|
||||
umask 077
|
||||
printf '[storage]\ndriver = "%s"\ngraphroot = "%s"\nrunroot = "%s"\n' \
|
||||
"${STORAGE_DRIVER:-overlay}" "$store_home/.local/share/containers/storage" "$runroot" > "$config"
|
||||
"${STORAGE_DRIVER:-overlay}" "$store_home/.local/share/containers/storage" "$runroot" > "$temporary_config"
|
||||
)
|
||||
# Several Linux RIDs can enter the shared store together. Readers must see
|
||||
# the complete configuration while another job initializes the same store.
|
||||
mv -f "$temporary_config" "$config"
|
||||
chmod 700 "$runroot"
|
||||
export CONTAINERS_STORAGE_CONF="$config"
|
||||
# The outer Podman container provides the user namespace and capabilities;
|
||||
|
||||
Reference in new issue
Block a user