From b32ab5be7c4a849a58ed700513d92c369711a898 Mon Sep 17 00:00:00 2001 From: Koda YeenBean Date: Wed, 15 Jul 2026 20:39:47 +0000 Subject: [PATCH] fixing release pipeline --- scripts/ci/build-release.sh | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/scripts/ci/build-release.sh b/scripts/ci/build-release.sh index 69a6660..de798b4 100755 --- a/scripts/ci/build-release.sh +++ b/scripts/ci/build-release.sh @@ -42,7 +42,8 @@ cd "$sdk_dir" # OpenWrt publishes relocatable SDKs whose host tools are x86-64 binaries. # On ARM runners, invoke the SDK's bundled x86-64 loader explicitly through # QEMU. This works without privileged binfmt_misc registration on the host. -case $(uname -m) in +build_host=$(uname -m) +case $build_host in x86_64|amd64) ;; aarch64|arm64|armv7l|armv8l) @@ -58,11 +59,14 @@ case $(uname -m) in echo "no relocatable x86-64 SDK wrappers found" >&2 exit 1 } - sed -i -E "s|^exec (\"\\\$dir/.*ld-linux-x86-64\\.so\\.2\")|exec ${qemu_x86_64} \\1|" "${sdk_wrappers[@]}" + sed -i -E \ + -e 's|^export LD_PRELOAD=.*(\$dir/.*runas\.so)"$|sdk_preload="\1"|' \ + -e "s|^exec (\"\\\$dir/.*ld-linux-x86-64\\.so\\.2\")|exec ${qemu_x86_64} \\1 --preload \"\\\$sdk_preload\"|" \ + "${sdk_wrappers[@]}" staging_dir/host/bin/sed --version >/dev/null ;; *) - echo "unsupported build host architecture: $(uname -m)" >&2 + echo "unsupported build host architecture: $build_host" >&2 exit 1 ;; esac @@ -88,7 +92,16 @@ printf '%s\n' \ '# CONFIG_TARGET_ALL_PROFILES is not set' \ 'CONFIG_PACKAGE_openuf=m' >.config make defconfig -make -j"$(nproc)" package/openuf/compile +build_jobs=$(nproc) +case $build_host in + aarch64|arm64|armv7l|armv8l) + (( build_jobs <= 2 )) || build_jobs=2 + ;; +esac +if ! make -j"$build_jobs" package/openuf/compile; then + echo "parallel build failed; retrying serially with verbose diagnostics" >&2 + make -j1 package/openuf/compile V=sc +fi mapfile -t packages < <(find bin/packages -type f -name "openuf-${version}-*.apk") if [[ ${#packages[@]} -ne 1 ]]; then -- 2.54.0