git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] ci: avoid unnecessary builds

From
Jeff King <peff@peff.net>
Date
Nov 4, 2022, 03:20 UTC
Message-ID
<Y2SFGmQnx7CXtTEI@coredump.intra.peff.net>
In-Reply-To
<Y2R3vJf1A2KOZwA7@nand.local>
On Thu, Nov 03, 2022 at 10:23:56PM -0400, Taylor Blau wrote:
Show 10 quoted lines
> But I think you make a compelling point (which doesn't match my own
> workflow, but I can see the utility of nonetheless).
> 
> I was thinking that we could rely on something similar to the ci-config
> ref stuff from back in e76eec35540 (ci: allow per-branch config for
> GitHub Actions, 2020-05-07), but it looks like it'll be a little
> trickier than that, maybe impossible.
> 
> We need to know about the state of the ci-config branch before we set
> the concurrency bits. So I think you *could* do something like:

As an aside, I wish there was a way to interpret per-repo environment variables in the actual action config. The current ci-config stuff works, but it's pretty horrible because (if I understand correctly) it spins up a VM just to evaluate a glob and say "nope, no CI needed on this branch". So:

  1. It's wasteful of resources, compared to a system where the Actions
     parser can evaluate a variable.
  2. It makes the Actions results page for a repo ugly, because skipped
     branches clutter the output with "yes, I passed CI" even though all
     they passed was a trivial job to say "don't bother running more
     CI".
  3. The problem you mention: it happens too late to affect the overall
     Actions flow, and instead individual jobs have to take it into
     account.

When I wrote the original ci-config stuff I looked for an alternative. You _can_ set per-repo variables in the form of secrets, but I couldn't find a way to evaluate them at the top-level of the yaml file. But maybe that has improved in the meantime. I had looked against as recently as a month or two ago and didn't find anything, but I'm far from an expert on Actions.

-Peff
Previous: Taylor BlauNext: Johannes Schindelin
Message 4 of 20 in “ci: avoid unnecessary builds”
  1. ci: avoid unnecessary buildsJohannes Schindelin via GitGitGadget, Nov 3, 2022
  2. Ævar Arnfjörð BjarmasonNov 4, 2022
  3. Taylor BlauNov 4, 2022
  4. Jeff KingNov 4, 2022
  5. Johannes SchindelinNov 8, 2022
  6. Jeff KingNov 9, 2022
  7. Taylor BlauNov 10, 2022
  8. Taylor BlauNov 4, 2022
  9. Derrick StoleeNov 7, 2022
  10. Taylor BlauNov 7, 2022
  11. Derrick StoleeNov 7, 2022
  12. Ævar Arnfjörð BjarmasonNov 7, 2022
  13. Derrick StoleeNov 7, 2022
  14. Taylor BlauNov 7, 2022
  15. Johannes SchindelinNov 8, 2022
  16. Taylor BlauNov 8, 2022
  17. Ævar Arnfjörð BjarmasonNov 7, 2022
  18. Derrick StoleeNov 8, 2022
  19. Junio C HamanoNov 8, 2022
  20. Johannes SchindelinNov 8, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.