From c3fe221210e0bf1ddf8c4fdd0b57fb0d1324c171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 5 Aug 2019 10:42:49 +0200 Subject: [PATCH 1/4] circleci: add python3 package into Docker image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We've switched to Python3 some time ago so it would make sense to provide Python3 in the CI image as well. Ref: https://github.com/openwrt/packages/pull/9584#issuecomment-518038631 Reported-by: Rosen Penev Signed-off-by: Petr Štetiar --- .circleci/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/Dockerfile b/.circleci/Dockerfile index c488a7926..274edb8e4 100644 --- a/.circleci/Dockerfile +++ b/.circleci/Dockerfile @@ -6,6 +6,7 @@ FROM debian:9 # v1.0.1 - Run as non-root, add unzip, xz-utils # v1.0.2 - Add bzr # v1.0.3 - Verify usign signatures +# v1.0.4 - Add support for Python3 RUN apt update && apt install -y \ build-essential \ @@ -18,6 +19,7 @@ git \ libncurses5-dev \ libssl-dev \ python \ +python3 \ signify-openbsd \ subversion \ time \ From b14adeb3a9eaf866cc2786c5d7c876157ced6c6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Mon, 5 Aug 2019 10:50:08 +0200 Subject: [PATCH 2/4] circleci: make logs of build failures more readable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 12b64804f..eb9ddefd1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -145,7 +145,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: From 4abdc0234f3a25b5c9edea08f61e4d9186283946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 13 Aug 2019 11:25:30 +0200 Subject: [PATCH 3/4] circleci: use Docker image v1.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This new image which is already available contains Python3 support. Signed-off-by: Petr Štetiar --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index eb9ddefd1..2edf04292 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,7 +2,7 @@ version: 2.0 jobs: build: docker: - - image: docker.io/openwrtorg/packages-cci:v1.0.3 + - image: docker.io/openwrtorg/packages-cci:v1.0.4 environment: - SDK_HOST: "downloads.openwrt.org" - SDK_PATH: "snapshots/targets/ath79/generic" From a6d5b5d1c1c6ea922afcfff1efac7fb55c9664c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Tue, 13 Aug 2019 15:20:15 +0200 Subject: [PATCH 4/4] circleci: provide prereq output in the build log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 200f2666fb1c ("sdk: fix GCC and Python dangling symlinks") in master tree has forced prereq build step, which is now failing on the CI as the Docker CI images are missing Python3 support, so now every build fails with the following error: make: *** [staging_dir/host/.prereq-build] Error 1 which is not helpful due to the silenced output of `make defconfig > /dev/null`, so let's add `make prereq` build step in order to get something usable next time. Reported-by: Karl Palsson Signed-off-by: Petr Štetiar --- .circleci/config.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2edf04292..111440797 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -94,6 +94,11 @@ jobs: working_directory: ~/build_dir command: | tar Jxf ~/sdk/$SDK_FILE --strip=1 + touch .config + make prepare-tmpinfo scripts/config/conf + ./scripts/config/conf --defconfig=.config Config.in + make prereq + rm .config cat > feeds.conf <