From 775e4f81e7feff7b27060eef415072864222f450 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 d9212baa45e2e011e3c55f4d8d35a20fd869e808 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 5bcc68b28..afc151235 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: From 07d330907cf0f0b32308fbb67efab715c9b23b0f 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 afc151235..10b64ed11 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 a6c658db01ebe8edeb8b7cb24126a277b6a744af 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 10b64ed11..22c1f6792 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 <