circleci: skip compiling packages not enabled
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 6 Nov 2019 08:57:15 +0000 (08:57 +0000)
committerYousong Zhou <yszhou4tech@gmail.com>
Wed, 6 Nov 2019 14:26:00 +0000 (14:26 +0000)
E.g. some packages are target, or arch specific, skip compiling them if
they cannot be enabled for current sdk.  This should reduce false
positives for packages like docker-ce etc.

Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
(cherry picked from commit 4f3244db40364163c0213adfbc0507695d937657)

.circleci/config.yml

index 19cd7d3f8fa6c3a3eb2bc8bbaeb535cca12fa3e7..94e0031dd3895b7e4a522d8f49697e537fedd7d9 100644 (file)
@@ -148,7 +148,16 @@ jobs:
                  echo_green "=> Package check OK"
              done
 
+             make \
+                 -f .config \
+                 -f tmp/.packagedeps \
+                 -f <(echo '$(info $(sort $(package-y) $(package-m)))'; echo -en 'a:\n\t@:') \
+              | tr ' ' '\n' >enabled-package-subdirs.txt
              for PKG in $PKGS ; do
+                 if ! grep -m1 -qE "(^|/)$PKG$" enabled-package-subdirs.txt; then
+                        echo_red "===+ Building: $PKG skipped. It cannot be enabled with $SDK_FILE"
+                        continue
+                 fi
                  echo_blue "===+ Building: $PKG"
                  make "package/$PKG/compile" -j3 V=s || {
                         RET=$?