All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCHv3 6/6] gitlab-ci: check all defconfigs on every push
Date: Mon, 27 Jul 2020 17:51:27 +0200	[thread overview]
Message-ID: <20200727155127.2703286-6-romain.naour@gmail.com> (raw)
In-Reply-To: <20200727155127.2703286-1-romain.naour@gmail.com>

The defconfig check has been introduced by the previous
patch before the building each defconfig but those builds
are done every week or more.

Checking if a defconfig is valid can be done on every
push in the repository since it take few seconds.

This would allow to detect as soon as possible a problem
in a defconfig and eventually avoid breaking the build
while build testing all defconfig.

Introduce a new job template ".defconfig_check" in
gitlab-ci.yml.in and modify the generate-gitlab-ci-yml
to create a job for each defconfig to run the test.

Although, we could have used only one job to do all
tests, using one job per defconfig allow to identify
easily in gitlab which defconfig is falling.

Tested:
https://gitlab.com/kubu93/buildroot/pipelines/138331069
https://gitlab.com/kubu93/buildroot/pipelines/171223758

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 support/misc/gitlab-ci.yml.in          | 13 +++++++++++++
 support/scripts/generate-gitlab-ci-yml |  2 +-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/support/misc/gitlab-ci.yml.in b/support/misc/gitlab-ci.yml.in
index 01592f7155..7218ea027e 100644
--- a/support/misc/gitlab-ci.yml.in
+++ b/support/misc/gitlab-ci.yml.in
@@ -34,6 +34,19 @@ check-package:
     script:
         - make check-package
 
+.defconfig_check:
+    script:
+        - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
+        - make ${DEFCONFIG_NAME}
+        - support/scripts/check-dotconfig.py .config configs/${DEFCONFIG_NAME}
+    artifacts:
+        when: on_failure
+        expire_in: 2 weeks
+        paths:
+            - .config
+    before_script:
+        - DEFCONFIG_NAME=$(echo ${CI_JOB_NAME} | sed -e 's,_check$,,g')
+
 .defconfig_base:
     script:
         - echo "Configure Buildroot for ${DEFCONFIG_NAME}"
diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
index 262a7649b2..5cef1146e2 100755
--- a/support/scripts/generate-gitlab-ci-yml
+++ b/support/scripts/generate-gitlab-ci-yml
@@ -10,7 +10,7 @@ cat "${input}"
     cd configs
     LC_ALL=C ls -1 *_defconfig
 ) \
-    | sed 's/$/: { extends: .defconfig }/'
+    | sed -r -e 's/^(.+)$/\1: { extends: .defconfig }\n\1_check: { extends: .defconfig_check }/'
 
 ./support/testing/run-tests -l 2>&1 \
     | sed -r -e '/^test_run \((.*)\).*/!d; s//\1: { extends: .runtime_test }/' \
-- 
2.25.4

  parent reply	other threads:[~2020-07-27 15:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 15:51 [Buildroot] [PATCHv3 1/6] configs/imx6ullevk_defconfig: remove typo Romain Naour
2020-07-27 15:51 ` [Buildroot] [PATCHv3 2/6] configs/rock_pi_4_defconfig: remove BR2_TARGET_UBOOT_NEEDS_PYTHON Romain Naour
2020-07-27 15:51 ` [Buildroot] [PATCHv3 3/6] configs/rock_pi_n10_defconfig: " Romain Naour
2020-07-27 15:51 ` [Buildroot] [PATCHv3 4/6] support/scripts: add check-dotconfig.py Romain Naour
2020-07-27 16:18   ` Yann E. MORIN
2020-07-27 15:51 ` [Buildroot] [PATCHv3 5/6] gitlab-ci: check generated config files Romain Naour
2020-07-27 15:51 ` Romain Naour [this message]
2020-07-27 16:19 ` [Buildroot] [PATCHv3 1/6] configs/imx6ullevk_defconfig: remove typo Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200727155127.2703286-6-romain.naour@gmail.com \
    --to=romain.naour@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.