Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 10/10] gitlab-ci: only check defconfigs for known branches
Date: Wed, 9 Sep 2020 00:02:54 +0200	[thread overview]
Message-ID: <75adc5b2-e652-e270-413e-1721acb6420e@gmail.com> (raw)
In-Reply-To: <c1ea91abce5dbf7068615b247ff77dd7f8ec8fbb.1599423132.git.yann.morin.1998@free.fr>

Le 06/09/2020 ? 22:12, Yann E. MORIN a ?crit?:
> Currently, the check of defconfigs is run for all branches, even those
> that are pushed only to run runtime tests. This is very inconvenient.
> 
> In fact, we only want to check the defconfigs on standard branches, that
> is master, next, and the maintenance branches.
> 
> This will also decrease drastically the number gitlab-ci minutes used
> when one pushes their repo to gitlab.com, where the number of CI minutes
> are now going to be pretty severely restricted.

Note, some qemu defconfig can be runtime tested. But ok it's not part of the
runtime testing infrastructure.

Reviewed-by: Romain Naour <romain.naour@gmail.com>

Best regards,
Romain


> 
> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
> Cc: Romain Naour <romain.naour@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
> Cc: Arnout Vandecappelle <arnout@mind.be>
> ---
>  support/scripts/generate-gitlab-ci-yml | 29 ++++++++++++++------------
>  1 file changed, 16 insertions(+), 13 deletions(-)
> 
> diff --git a/support/scripts/generate-gitlab-ci-yml b/support/scripts/generate-gitlab-ci-yml
> index f8b533f2c3..30222f1a04 100755
> --- a/support/scripts/generate-gitlab-ci-yml
> +++ b/support/scripts/generate-gitlab-ci-yml
> @@ -42,37 +42,40 @@ gen_basics() {
>  
>  gen_defconfigs() {
>      local -a defconfigs
> -    local build_defconfigs cfg
> +    local template cfg ext
>  
>      defconfigs=( $(cd configs; LC_ALL=C ls -1 *_defconfig) )
>  
> -    build_defconfigs=false
>      if [ -n "${CI_COMMIT_TAG}" ]; then
>          # For tags, create a pipeline.
> -        build_defconfigs=true
> +        template=base
>      fi
>      if [ -n "${CI_PIPELINE_TRIGGERED}" ]; then
>          # For pipeline created by using a trigger token.
> -        build_defconfigs=true
> +        template=base
>      fi
>      case "${CI_COMMIT_REF_NAME}" in
> +        # For master, next, and maintenance branches, only check the defconfigs
> +        (master|next|????.??.x)
> +            template=check
> +            ext=_check
> +        ;;
>          # For the branch or tag name named *-defconfigs, create a pipeline.
>          (*-defconfigs)
> -            build_defconfigs=true
> +            template=base
>          ;;
>          (*-*_defconfig)
>              defconfigs=( "${CI_COMMIT_REF_NAME##*-}" )
> -            build_defconfigs=true
> +            template=base
>          ;;
>      esac
>  
> -    for cfg in "${defconfigs[@]}"; do
> -        if ${build_defconfigs}; then
> -            printf '%s: { extends: .defconfig_base }\n' "${cfg}"
> -        else
> -            printf '%s_check: { extends: .defconfig_check }\n' "${cfg}"
> -        fi
> -    done
> +    if [ -n "${template}" ]; then
> +        for cfg in "${defconfigs[@]}"; do
> +            printf '%s%s: { extends: .defconfig_%s }\n' \
> +                   "${cfg}" "${ext}" "${template}"
> +        done
> +    fi
>  }
>  
>  gen_tests() {
> 

  reply	other threads:[~2020-09-08 22:02 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-06 20:12 [Buildroot] [PATCH 00/10] gitlab-ci: handle all conditional jobs in the generating script (branch yem/gitlab-ci-cond) Yann E. MORIN
2020-09-06 20:12 ` [Buildroot] [PATCH 01/10] gitlab-ci: introduce main() in generating script Yann E. MORIN
2020-09-08 20:49   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 02/10] gitlab-ci: share the image version with the child Yann E. MORIN
2020-09-08 20:57   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 03/10] gitlab-ci: handle the defconfig build conditions in script Yann E. MORIN
2020-09-08 21:08   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 04/10] gitlab-ci: defconfig_check is included in defconfig build Yann E. MORIN
2020-09-08 21:08   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 05/10] gitlab-ci: handle the run-time tests conditions in script Yann E. MORIN
2020-09-08 21:14   ` Romain Naour
2020-09-09  7:40     ` Yann E. MORIN
2020-09-06 20:12 ` [Buildroot] [PATCH 06/10] gitlab-ci: handle single defconfig " Yann E. MORIN
2020-09-08 21:19   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 07/10] gitlab-ci: handle single runtime test " Yann E. MORIN
2020-09-08 21:23   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 08/10] gitlab-ci: handle the basic tests " Yann E. MORIN
2020-09-08 21:39   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 09/10] gitlab-ci: move before-script before script Yann E. MORIN
2020-09-08 21:40   ` Romain Naour
2020-09-06 20:12 ` [Buildroot] [PATCH 10/10] gitlab-ci: only check defconfigs for known branches Yann E. MORIN
2020-09-08 22:02   ` Romain Naour [this message]
2020-09-08 20:47 ` [Buildroot] [PATCH 00/10] gitlab-ci: handle all conditional jobs in the generating script (branch yem/gitlab-ci-cond) Romain Naour
2020-09-09  7:39   ` 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=75adc5b2-e652-e270-413e-1721acb6420e@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox