Commit Graph

14 Commits

Author SHA1 Message Date
Michael Daniels
632c05cddc .github/actions/checkout: bump actions/github-script from 8 to 9 2026-08-08 10:34:26 -04:00
Gerhard Schwanzer
ea1628f4e7 actions/checkout: retry transient API failures
Retry transient GitHub API failures when resolving ci/pinned.json so unrelated PR jobs can continue.

Assisted-by: pi coding agent / Mika (OpenAI gpt-5.6-sol)
2026-07-10 10:47:08 +02:00
Ihar Hrachyshka
09ddb874c1 github: Serialize git worktree initialization
Fixes #511286
2026-04-20 20:10:40 -04:00
Michael Daniels
8adaa85a7c actions/checkout: log disk usage after checkout, don't use tmpfs on MacOS
We run out of disk on the latest pinned version on MacOS only, because by
default this allocates 50% of memory for the tmpfs, which is 3.5GB on MacOS
(and 4GB on Linux).

We can't increase to 4GB, though, because we get the error
"Desired memsize 4294967296 too large - defaulting to 3758096384 bytes"
if we do.

The logging I add would have saved me a lot of trouble figuring this out.
2026-04-04 16:13:11 -04:00
Michael Daniels
0535f37693 actions/checkout: update github-script action
Dependabot missed this in #441182.
2026-03-29 17:47:06 -04:00
Matt Sturgeon
79f6bf1d2d actions/checkout: manually fetch ci/pinned.json patch
In a shallow clone, `git fetch` may fail to apply thin packs due to
missing base objects.

We typically don't notice this with first-parent commits and prospective
merge commits, but it seems fairly common with arbitrary PR-branch
commits.

In this instance we don't need the full commit data, we only need to
apply its diff as a patch. So fetch the diff from GitHub's API and apply
using `git apply`.

This partially reverts commit 4787f35ede
2026-01-22 00:30:25 +00:00
Matt Sturgeon
4787f35ede actions/checkout: handle ci/pinned.json bump commits 2026-01-20 17:13:42 -03:00
Matt Sturgeon
c25dd6c655 actions/checkout: update input descriptions
In fb32eb0f29 we moved the checked-out
worktrees into a `nixpkgs` directory. Update the input descriptions to
reflect this.
2025-08-22 17:30:44 +01:00
Wolfgang Walther
c18d1e4af8 actions/checkout: always checkout pinned commits
With the latest performance improvements, this only adds up to 1s, but
reduces complexity in managing pinned checkouts explicitly, especially
when we need *both* pinned checkouts in the next commit.
2025-08-22 12:54:28 +02:00
Wolfgang Walther
fb32eb0f29 actions/checkout: use single tmpfs with subfolders
This fixes problems on darwin, where the new tmpfs folder would not be
fully empty, but git only creates worktrees on fully empty directories.
2025-08-22 09:45:34 +02:00
Wolfgang Walther
4b4aa628da actions/checkout: parallelize checkout of multiple commits on tmpfs
Instead of fetching up to 3 times on each new checkout, we now fetch all
the commits we're going to need at once. Afterwards, we checkout the
different worktrees in parallel, which doesn't give us much, yet,
because it would still be IO-bound on its own. Inconsistent IO
performance on disk is also the biggest limitation for checkout right
now, where checkout times range everywhere from 20s to 40s.

By checking out the worktrees on a tmpfs, the actual checkout only takes
1s and benefits from parallelization. The overall checkout time is now
8-11s, depending on the number of commits.

That's a reduction of 10-30s and we get this speedup for almost every
job in the PR workflow, which is huge.

This potentially has a nice side-effect for Eval, too: Because the repo
is in RAM, Eval seems to run slightly faster, up to 10 seconds less.
2025-08-21 21:53:49 +02:00
Wolfgang Walther
f01b6b4754 actions/checkout: remove unused input types
The two as-at inputs, were not boolean anymore, but GHA didn't complain.
Input types are actually not a thing for composite actions - they are
only documented for callable workflows.
2025-08-20 18:52:20 +02:00
Wolfgang Walther
7ab632b30f actions/checkout: rename inconsistent pinned-from input 2025-08-20 17:17:07 +02:00
Wolfgang Walther
b51e104439 actions/checkout: rename from actions/get-merge-commit
This moves the logic to "check whether the PR can be merged and
determine the relevant commits" into the PR / prepare job directly -
since that's the only place where it is supposed to be used.

Because of the if condition in get-merge-commit, this logic was run
multiple times, for example in the lint workflow, where only one of
targetSha or mergedSha was provided as input. However, this input was
thrown away directly. This might not be a big problem, because this was
not expensive, so far. But with the next commit, this will become more
so.

This also separates the logic a bit cleaner - `prepare` figures out all
the parameters for the whole PR workflow, while `checkout` handles the
consistency around these checkouts.
2025-08-20 17:17:04 +02:00