circleci: make logs of build failures more readable
authorPetr Štetiar <ynezz@true.cz>
Mon, 5 Aug 2019 08:50:08 +0000 (10:50 +0200)
committerJeffery To <jeffery.to@gmail.com>
Wed, 14 Aug 2019 18:30:46 +0000 (02:30 +0800)
Due to concurrent build, it's currently not that easy to find the proper
reason for the package build failure, so let's just build the failing
package with -j1 in order to provide more human readable build log
failures.

Ref: https://github.com/openwrt/packages/pull/9584#issuecomment-518038631
Signed-off-by: Petr Štetiar <ynezz@true.cz>
.circleci/config.yml

index 5bcc68b28826785bddbd2b38702ab42038e1f834..afc15123558b53cba0e3cd6f6705b4ad9ef94804 100644 (file)
@@ -143,7 +143,11 @@ jobs:
 
              for PKG in $PKGS ; do
                  echo_blue "===+ Building: $PKG"
-                 make "package/$PKG/compile" -j3 V=s
+                 make "package/$PKG/compile" -j3 V=s || {
+                        RET=$?
+                        echo_red "===+ Building: $PKG failed, rebuilding with -j1 for human readable error log"
+                        make "package/$PKG/compile" -j1 V=s; exit $RET
+                 }
              done
 
       - store_artifacts: