release.yml: fail-fast on arm64 shlib install + sanity check
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 2m16s
Some checks failed
Forgejo Release postit-deb / release (push) Failing after 2m16s
When the apt-get install of arm64 shlibs fails silently (e.g. because the configured apt sources don't include arm64 for some packages), the next build step still tries to cross-build for arm64 and dpkg-shlibdeps aborts. The Makefile's mv pattern then matches the previous amd64 .deb (same filename prefix), exits 0, and the missing arm64 .deb is only discovered later in the 'Localiser les .deb' step. This adds: - explicit set -e so any failure aborts the step cleanly - `dpkg --add-architecture arm64` with fail-fast on error - pre-flight apt-cache show check for each arm64 package - explicit fail-fast on apt-get install failure - dpkg -l sanity check to confirm the libs are installed If the arm64 packages really are not available from the configured apt sources, the workflow will now fail with a clear message instead of producing a half-broken release.
This commit is contained in:
parent
acb3ee2c8b
commit
cbb7915907
1 changed files with 17 additions and 2 deletions
|
|
@ -83,12 +83,27 @@ jobs:
|
|||
# host. We add arm64 as a foreign architecture and pull
|
||||
# them in. --no-install-recommends keeps the install
|
||||
# surface minimal.
|
||||
dpkg --add-architecture arm64
|
||||
set -e
|
||||
dpkg --add-architecture arm64 || { echo "::error::dpkg --add-architecture arm64 failed"; exit 1; }
|
||||
apt-get update
|
||||
# Verify each arm64 package is actually installable. Bail
|
||||
# early with a clear message if any are missing from the
|
||||
# configured apt sources — silent apt-get install
|
||||
# failures are the worst kind of workflow bug.
|
||||
for pkg in libc6:arm64 libstdc++6:arm64 \
|
||||
libfontconfig1:arm64 libfreetype6:arm64 \
|
||||
libgtk-3-0:arm64; do
|
||||
if ! apt-cache show "$pkg" >/dev/null 2>&1; then
|
||||
echo "::error::arm64 package '$pkg' is not available in apt sources"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
apt-get install -y --no-install-recommends \
|
||||
libc6:arm64 libstdc++6:arm64 \
|
||||
libfontconfig1:arm64 libfreetype6:arm64 \
|
||||
libgtk-3-0:arm64
|
||||
libgtk-3-0:arm64 || { echo "::error::Failed to install arm64 shlibs"; exit 1; }
|
||||
# Sanity-check: the libs must be visible to dpkg-shlibdeps.
|
||||
dpkg -l libc6:arm64 libstdc++6:arm64 | tail -3
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
: > "$STATE_FILE"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue