Commit Graph

68 Commits

Author SHA1 Message Date
Wolfgang Walther
56d29bbae1 workflows/build: build shells on a single darwin runner only
Because we have Rosetta, we can use a single darwin runner to build both
shells. Most time is spent for downloading Nix and checking out Nixpkgs
anyway and this can be saved if only run once.

Also, this prepares for the deprecation of the old macos-13 runners,
which were based on x86_64 CPUs in September 2025:
https://github.blog/changelog/2025-07-11-upcoming-changes-to-macos-hosted-runners-macos-latest-migration-and-xcode-support-policy-updates/
2025-08-11 18:05:20 +02:00
Wolfgang Walther
f105ab12f6 workflows/build: avoid downloading from cachix
This avoids downloading results from cachix, when they don't need to be
rebuilt, which just wastes time and resources.
2025-08-11 18:05:18 +02:00
Wolfgang Walther
8a9f0b8a47 workflows: checkout pinned nixpkgs explicitly
This is slightly faster than downloading and extracting a tarball and
additionally allows a sparse checkout. No need to download docs or nixos
for our purpose.

The data is quite noisy, but suggests improvements from anywhere between
5-15 seconds for each job using the pinned nixpkgs.
2025-08-11 17:57:11 +02:00
Wolfgang Walther
de7aa9f213 workflows: remove extra_nix_config.sandbox
This is true by default anyway.
2025-08-11 17:54:13 +02:00
Wolfgang Walther
5e304bcc37 build(deps): bump actions/checkout from 4.2.2 to 5.0.0 (#432842) 2025-08-11 15:33:46 +00:00
dependabot[bot]
b455a0a294 build(deps): bump cachix/install-nix-action from 31.4.1 to 31.5.2
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.4.1 to 31.5.2.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](f0fe604f8a...fc6e360bed)

---
updated-dependencies:
- dependency-name: cachix/install-nix-action
  dependency-version: 31.5.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 15:07:05 +00:00
dependabot[bot]
593aee095f build(deps): bump actions/checkout from 4.2.2 to 5.0.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.2 to 5.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](11bd71901b...08c6903cd8)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 5.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-11 15:06:58 +00:00
Wolfgang Walther
436d54174d .github/workflows: set timeouts
None of our jobs is expected to run for 6 hours, the GitHub limit. These
limits are generous and take into accounts that some jobs need to wait
for others.

If jobs exceed these times, most likely something else is wrong and
needs investigation.
2025-08-09 17:26:03 +02:00
Wolfgang Walther
bfb20b9fea workflows/build: build nixpkgs tarball
This adds a build job for the tarball, which might help uncover eval
issues on attributes not normally touched by Eval, aka those added in
`pkgs/top-level/packages-config.nix`.
2025-07-24 09:50:39 +02:00
Michael Daniels
261bba1fcd workflows/build: be clearer about what is being built
Committers could get the false impression from, e.g., `PR / Build / aarch64-linux` that this workflow builds the packages changed in the current PR. Such a misunderstanding could pair poorly with the "enable auto-merge" button, once that's enabled.
2025-07-11 10:25:45 -04:00
Wolfgang Walther
ea10312659 workflows: nix: 2.29.0 -> 2.29.1 2025-06-24 18:26:59 +02:00
Wolfgang Walther
7763be5a80 workflows/pr: refactor base/head branch decision making
Some jobs purposefully only run on certain base or head branches. By
centralizing the logic, parts of it can easily be re-used later. Also,
this gives them an explicit name and thus makes them easier to
understand.
2025-06-22 14:21:03 +02:00
Wolfgang Walther
09ddb1a8a0 workflows: sync merge commits
This fixes a problem where each workflow would get their own merge
commit. This happens frequently when the target branch is merged into a
the same time, different workflows in the same run will run
get-merge-commit at different times and thus have different merge
commits.

Since the jobs don't really depend on each other, this doesn't cause
practical problems, yet. But it has already led to strange CI failures
in a still unmerged PR, which can be prevented from happening with this
clean approach.

And yes, this saves a few API calls on every run.
2025-06-20 09:22:48 +02:00
Wolfgang Walther
959eed1f2a workflows/{pr,push}: init
Those two workflows bundle all the main jobs in two event-specific
wrapper workflows. This enables us to do two things later on:
- Synchronize the merge commits between most of the jobs run in a PR.
- Create a single "required" job to be targeted by GitHub's "required
status checks to pass" feature.
2025-06-17 22:38:09 +02:00
Wolfgang Walther
41b092c90c ci/workflows: run yamlfmt
Introduced after the yamlfmt PR was written.
2025-06-15 12:13:09 +02:00
Wolfgang Walther
6793e238fa workflows/{labels,reviewers}: fix concurrency groups for nested workflows
This didn't work as intended. When a workflow is run with
`workflow_call`, it will have `github.workflow` set to the *parent*
workflow. So the `caller` input that we passed, resulted in this
concurrency key:

```
Eval-Eval-...
```

But that's bad, because the labels and reviewers workflows will cancel
each other!

What we actually want is this:
- Label and Reviewers workflow should have different groups.
- Reviewers called via Eval and called directly via undraft should have
*different* groups.

We can't use the default condition we use everywhere else, because
`github.workflow` is the same for Label and Reviewers. Thus, we hardcode
the workflow's name as well. This essentially means we have this as a
key:

```
<name-of-running-workflow>-<name-of-triggering-workflow>-<name-of-event>-<name-of-head-branch>
```

This should do what we want.

Since workflows can be made reusable workflows later on, we add those
hardcoded names to *all* concurrency groups. This avoids copy&paste
errors later on.
2025-06-13 17:31:27 +02:00
Wolfgang Walther
7ba7720b28 workflows: prevent accidental cancelling of other PRs
This can happen when two PRs run at the same time, which come from
different forks, but have the same head branch name.

github.head_ref is suggested by GitHub's docs, but.. that's not really
useful for cases with forks.
2025-06-13 17:00:31 +02:00
Wolfgang Walther
cd82aa54f5 workflows/build: build all the basics in a single workflow
This new workflow builds both manuals, the shell and the lib tests all
in a matrix of four jobs. This allows re-using the shared checkout and
the pinned nixpkgs download and saves time in the most likely cache: No
changes, just download from cache. Each step checks the cancelled
condition, which causes it to run even if the previous steps failed.
This way we get a full picture even if the first step fails immediately.

This could later be optimized to build more in parallel as well, but
we'll first need to clear the conditions on building the manuals on the
master branch only.

This reduces the number of jobs from up to 8 to 4 for this part.
2025-06-13 09:19:17 +02:00