From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)gmail(dot)com> |
Cc: | Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Wolfgang Walther <walther(at)technowledgy(dot)de> |
Subject: | Re: ci: Allow running mingw tests by default via environment variable |
Date: | 2025-03-04 12:58:40 |
Message-ID: | hu6l3xyfnhgqxm2imqiyes7ewi6cjgxfif3pws45cjtpjo7uo6@wse3mkw3abks |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2025-03-04 13:27:29 +1300, Thomas Munro wrote:
> On Fri, Apr 26, 2024 at 12:02 AM Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com> wrote:
> > On Sat, 13 Apr 2024 at 05:12, Andres Freund <andres(at)anarazel(dot)de> wrote:
> > > I propose that we instead run the task automatically if
> > > $REPO_MINGW_TRIGGER_BY_DEFAULT is set, typically in cirrus' per-repository
> > > configuration.
> > >
> > > Unfortunately that's somewhat awkward to do in the cirrus-ci yaml
> > > configuration, the set of conditional expressions supported is very
> > > simplistic.
> > >
> > > To deal with that, I extended .cirrus.star to compute the required environment
> > > variable. If $REPO_MINGW_TRIGGER_BY_DEFAULT is set, CI_MINGW_TRIGGER_TYPE is
> > > set to 'automatic', if not it's 'manual'.
> >
> > Changes look good to me. My only complaint could be using only 'true'
> > for the REPO_MINGW_TRIGGER_BY_DEFAULT, not a possible list of values
> > but this is not important.
>
> Here's a generalised version of 0001. If you put this in your
> repository settings on Cirrus's website:
>
> REPO_CI_AUTOMATIC_TRIGGER_TASKS="mingw netbsd"
>
> ... then it defines:
>
> CI_TRIGGER_TYPE_MINGW=automatic
> CI_TRIGGER_TYPE_NETBSD=automatic
> CI_TRIGGER_TYPE_OPENBSD=manual
Nice!
> The set of tasks that get this treatment is defined by this line in
> .cirrus.star:
>
> default_manual_trigger_tasks = ['mingw', 'netbsd', 'openbsd']
>
> Then the individual tasks in .cirrus.tasks.yml use those variables:
>
> - name: NetBSD - Meson
> + # See REPO_CI_AUTOMATIC_TRIGGER_TASKS in .cirrus.star
> + trigger_type: $CI_TRIGGER_TYPE_NETBSD
>
> Unfortunately the funky Starlark language doesn't seem to have regular
> expressions, so it's just searching for those substrings without
> contemplating delimiters. That doesn't seem to be a problem at this
> scale...
FWIW, It does:
https://cirrus-ci.org/guide/programming-tasks/#re
https://github.com/qri-io/starlib/tree/master/re
Your edited version is looking good to me!
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2025-03-04 13:00:45 | Re: ci: Allow running mingw tests by default via environment variable |
Previous Message | Amit Kapila | 2025-03-04 12:35:55 | Re: Next commitfest app release is planned for March 18th |