ci: build: provide verbose output if target/linux build step fails

Currently we're seeing following build failure in target/linux build
step:

  sysupgrade-prpl_freedom/kernel
  sysupgrade-prpl_freedom/root
  Usage: mkits.sh -A arch -C comp -a addr -e entry -v version -k kernel [-D name -n address -d dtb] -o its_file
      -A ==> set architecture to 'arch'
      -C ==> set compression type 'comp'
  ...snip...
  make[5]: *** [Makefile:46: /builds/prpl-foundation/prplos/prplos/build_dir/target-aarch64_cortex-a73+neon-vfpv4_musl/linux-ipq95xx_generic/qcom_alxx-fit-uImage.itb] Error 1
  make[4]: *** [Makefile:78: install] Error 2
  make[3]: *** [Makefile:12: install] Error 2
  time: target/linux/install#101.36#27.43#78.72

Without the complete command line of mkits.sh step it might be quite
tedious to find out the culprit, so lets try to provide more details by
running the target/install step again with verbose output.

Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
Petr Štetiar 2025-04-18 05:51:47 +00:00
parent 87126672e0
commit a822e0a6c2
No known key found for this signature in database
GPG Key ID: 58EE120F30CC02D3

View File

@ -96,6 +96,15 @@
echo '[!] ERROR: build failed'
exit 1
" ERR
- >
trap "
grep -qz 'ERROR: target/linux failed to build' logs/build.log && {
echo '[!] ERROR: target/linux seems to fail, enabling verbose output'
make target/install -j $(nproc) V=s 2>&1 | tee --append logs/build.log
}
echo '[!] ERROR: build failed'
exit 1
" ERR
- make -j $(nproc) 2>&1 | tee --append logs/build.log
- >
if [ -n "$CI_BUILD_EXPORT_STAGING_ROOTFS" ]; then