Commit graph

1189 commits

Author SHA1 Message Date
Wolfgang Walther
65315e5400
workflows: self-test on change
All workflows where it's remotely useful now trigger on a pull_request
event when the workflow file itself is changed. This gives us basic
sanity testing of changes to workflow files itself and reduces the need
for manual tests in forks.
2025-05-14 08:18:38 +02:00
Leona Maroni
86de96dbc1
workflows/periodic-merges: integrate with staging-25.05
For now this uses master as root before branch-off.
2025-05-13 17:36:27 +02:00
Wolfgang Walther
68bcd5e6f2
workflows/eval: fix missing dependency of tag job
Introduced in #406266.
2025-05-13 08:30:18 +02:00
Wolfgang Walther
afc3b33403
workflows/get-merge-commit: fix actionlint warning 2025-05-13 08:28:22 +02:00
Wolfgang Walther
af6faf8760
workflows/eval: remove attrs step
Previously, the attrs step consisted of:
- 7s queue time
- 1m 15s run time

Only 25s of this were spent preparing the attr paths. A bit more than a
minute was just spent for queuing, checking out the repo, downloading
nix, downloading dependencies, uploading the artifacts - and then
downloading them again in the next step. All of that can be avoided if
we collect the attrs as part of the outpaths job.

By running the attrs step as part of each outpaths step the attrpaths
will be collected 4x, but:
- We save a minute for each eval run to complete.
- We save a full job, giving us more free runners and *possibly* less
queue times for other jobs in the repo.
- We reduce complexity in the workflow file.
2025-05-11 22:22:48 +02:00
Wolfgang Walther
962836d4d0
workflows/get-merge-commit: return targetSha
We can fetch the targetSha directly with the mergedSha from the API.
This avoids a checkout with fetch-depth: 2 for a small performance
improvement.
2025-05-11 22:22:47 +02:00
Wolfgang Walther
456a4697b1
workflows/eval: load supportedSystems from JSON file
This is a refactor to prepare the next commit. It doesn't do much on its
own, but is separated for ease of review.
2025-05-11 22:22:45 +02:00
Wolfgang Walther
2dfc31f47d
workflows/manual-nixpkgs: fix nixdoc path 2025-05-11 13:39:55 +02:00
Jörg Thalheim
53a79ee500
workflows/check-format: add actionlint (#406114) 2025-05-11 12:55:51 +02:00
Wolfgang Walther
089f146df5
workflows/{manual-nixos,nix-parse}: fix failing workflows (#406138) 2025-05-11 10:41:39 +00:00
Wolfgang Walther
b431c55e32
workflows/nix-parse: fix failing workflow 2025-05-11 12:36:51 +02:00
Wolfgang Walther
3605e43472
workflows/manual-nixos: fix failing workflow 2025-05-11 12:36:40 +02:00
Jörg Thalheim
5a1b4e070b
workflows: Use ARM runners (#405943) 2025-05-11 12:34:21 +02:00
Jörg Thalheim
7fd771ee97
ci: allow running jobs locally (#404466) 2025-05-11 12:28:04 +02:00
Wolfgang Walther
84bb35a3a1
labels: no CI label for OWNERS changes
We can use the same "hack" as in labeler-no-sync.yml, because OWNERS is
the only file without extension in that directory structure.

This makes it easier to search for CI related PRs via label.
2025-05-11 12:20:07 +02:00
Wolfgang Walther
101a271eed
ci/parse: test for nix 2.3 and lix
This adds the minimum nix version and the latest lix version to the
matrix of parse checks. Especially the minimum nix version is relevant,
because parsing routinely breaks because of introduction of newer
syntax.

Adding lix just completes the picture.
2025-05-11 12:14:59 +02:00
Wolfgang Walther
a553ef2950
ci/parse: init
The nix-parse workflow can now be run locally the same way as in CI.

To do this, the CI's workflow was slightly adjusted. Instead of testing
only the changed files, we're now testing all files in the repository.

This is possible in two ways:

1. By calling nix-instantiate once with all files as arguments. This
will be rather fast, but only the first error is shown before it errors
out.
2. By calling nix-instantiate once for each file. This will be much
slower, but has the advantage that we see all errors at once.

To avoid running the long variant every time, we first do a quick check
with the fast version. If that fails, we run the slower one to report
the errors. This gives us the best of both.
2025-05-11 12:14:57 +02:00
Wolfgang Walther
a56fa7a4a2
workflows/check-shell: test aarch64-linux and x86_64-darwin as well
GitHub has all the different runners, so we can just as well check that
shell.nix works.
2025-05-11 12:11:14 +02:00
Wolfgang Walther
c148dc78a1
workflows/manual-nixos: refactor matrix
A bit easier to read.
2025-05-11 12:11:13 +02:00
Wolfgang Walther
d3e4865b10
workflows: use ARM runners
ARM runners are supposed to be more energy efficient than x86. Also,
from limited testing, they appear to be faster for the eval jobs as
well. Average run time for the "Outpaths (x86_64-linux)" job was 4m 27s,
so far. In the first run, this job came in at 3m 9s. This effect did not
show for other jobs, yet.

The following two exceptions are made right now:
- nixpkgs-lib-tests currently fails on the ARM runner building Nix 2.3
- nixpkgs-vet is currently pinned to a x86_64-linux only binary release
2025-05-11 12:11:10 +02:00
Wolfgang Walther
8b65ba5b8e
workflows/check-format: add actionlint
I added a lint-action.sh script in .github/workflows a while ago while
fixing some warnings. But I haven't run it myself ever since. This needs
to be part of CI to make any use of it.
2025-05-11 11:06:06 +02:00
Wolfgang Walther
3f004ac12c
workflows/eval-aliases: split from eval
The eval-aliases job is independent of all the other eval jobs. By
splitting it into a separate workflow, we avoid running it in two cases:

1. When turning a PR "ready to review". In this case, the main eval
workflow needs to run to be able to tag reviewers - but not
eval-aliases.

2. On branches like master, staging, etc. We only need to run eval there
to have a result to compare against in PRs. eval-aliases doesn't
contribute to that.

Thus, this will avoid wasting resources.
2025-05-11 11:01:10 +02:00
Wolfgang Walther
7c16d15d7f
ci/shell: init
The dev shell can now be built locally the same way as in CI with:

  nix-build ci -A shell
2025-05-10 22:14:16 +02:00
Wolfgang Walther
d253ad12b2
ci/manual-nixpkgs: init
The Nixpkgs manual can now be built locally the same way as in CI with:

  nix-build ci -A manual-nixpkgs -A manual-nixpkgs-tests
2025-05-10 22:14:15 +02:00
Wolfgang Walther
89520b962a
ci/manual-nixos: init
The NixOS manual can now be built locally the same way as in CI with:

  nix-build ci -A manual-nixos
2025-05-10 22:13:58 +02:00
Wolfgang Walther
9b01e09a35
workflows: avoid running jobs when editing title etc.
We intend to use the edited event to react to base branch changes - but
before this change, we also ran those jobs on simple edits like title or
description.

While this works for some of the quicker jobs, it will not be
sustainable for all evaluation-related jobs. But evaluation needs to be
re-triggered on a base branch change as well, thus this change.
2025-05-10 18:28:57 +02:00
Wolfgang Walther
93fecc6375
workflows/check-nixf-tidy: drop (#405703) 2025-05-10 07:13:54 +00:00
Wolfgang Walther
60450491f9
workflows/check-nixf-tidy: drop
The workflow has been disabled for 9 months. Except for the Eval
workflow, this is the most complex, yet unused, workflow. As discussed
in #332695, this needs a proper wrapper first. Chances are high, that
once a good CLI tool is available, the workflow would be implemented
entirely different: We could easily run it via treefmt as well, so that
we get the same results locally as in CI.
2025-05-09 21:59:49 +02:00
Wolfgang Walther
1cb7a384e0
workflows/keep-sorted: drop and move to treefmt
Same reasoning as the commit before, but keep-sorted has even less
overhead than editorconfig-checker. Benchmark has it at 1 second per
run.
2025-05-09 21:54:12 +02:00
Wolfgang Walther
ba4fe10465
workflows/editorconfig: drop and move to treefmt
We already have treefmt running for nixfmt, so it's easy to just add
another formatter to it. This gives a much better UX, because all
formatting errors are reported through the same channel.

It also saves us one CI job, which takes most of the time to just set up
the machine, clone the repo and download Nix - while doing a minimum of
actual work.

Total execution time for treefmt is ~10% slower:
- 38s only nixfmt
- 43s nixfmt + editorconfig-checker
2025-05-09 21:09:47 +02:00
Wolfgang Walther
7097614efd
ci/lib-tests: init
This allows running the lib-tests locally in exactly the same way that
they are run in CI:

  nix-build ci -A lib-tests
2025-05-09 20:06:25 +02:00
Wolfgang Walther
e90894103a
workflows/lib-tests: rename from eval-lib-tests
They are not really related to eval.yml.
2025-05-09 20:06:22 +02:00
Martin Weinelt
c58ad18999
workflows/editorconfig.editorconfig-checker: 2.4.0 -> 3.2.0 (#404980) 2025-05-08 00:56:37 +02:00
Robert Schütz
02f2714c55 workflows/no-channel: fix typo 2025-05-07 11:09:05 -07:00
Wolfgang Walther
a70d047c15
workflows/editorconfig.editorconfig-checker: 2.4.0 -> 3.2.0
We have a pinned nixpkgs revision for all our CI tools, but we're not
making use of it for editorconfig-checker. Instead, it has it's own,
unmaintained, pin.

Let's fix that. On the way, we're upgrading the tool to 3.2.1, which
requires adjusting our .editorconfig file slightly to ignore
auto-generated package-lock.json files.
2025-05-07 20:01:38 +02:00
Johannes Kirschbauer
c8276114ac
fix(ci/eval-stats): resolve prResult symlink 2025-05-07 18:01:39 +02:00
Wolfgang Walther
b8ca313e97
labels: prevent labelling PRs to staging-next as backport 2025-05-07 12:21:34 +02:00
Wolfgang Walther
224de839f1
workflows/check-maintainers-sorted: drop and replace with keep-sorted
We already have a generic keep-sorted workflow, so we don't need to roll
our own for the maintainers list.

This will result in a slightly different order, because the nix script
ignored "-" and "_", while keep-sorted sorts them first. But, the order
is consistent and that's what matters.
2025-05-06 21:29:26 +02:00
Philip Taron
e7072d135f
build(deps): bump cachix/install-nix-action from 31.2.0 to 31.3.0 (#404347) 2025-05-06 10:54:26 -07:00
Wolfgang Walther
40963bf4c2
workflows/no-channel: run again when base changed
Because of the branches filter, the job would **not** re-run when only
the base-branch was changed, thus leaving the contributor with a failed
check.

With this change, the job should be triggered and then skipped in this
case, so the check in the list should be replaced with a skip.

Note, this also means that this step will show up in every PR as
skipped, even when it was never failed before.
2025-05-05 21:49:52 +02:00
Wolfgang Walther
b36d85b731
workflows/keep-sorted: make it fail
This never worked as intended, because it relies on "-o pipefail", which
is not set in GitHub Actions by default. It will be set when explicitly
selecting the shell as bash, though.

https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
2025-05-05 21:09:33 +02:00
Jörg Thalheim
34b47aacef
.github/dependabot.yml: disable default labels (#404397) 2025-05-05 20:14:11 +02:00
Wolfgang Walther
12a7f01211
Revert "labels: add backport label for automatic browser updates"
This reverts commit 189dd476d4.
2025-05-05 17:54:44 +02:00
Wolfgang Walther
5388d4f37b
Revert "labels: fix backport labels for CI workflows"
This reverts commit 54331e1101.
2025-05-05 17:19:07 +02:00
Wolfgang Walther
2b5df8c18d
.github/dependabot.yml: disable default labels
We have our own labels and don't need "dependencies" or "github_actions"
labels.
2025-05-05 17:15:19 +02:00
Wolfgang Walther
54331e1101
labels: fix backport labels for CI workflows
This broke in #402304.

According to the upstream docs it's possible to use the same label
multiple times, this should work.
2025-05-05 17:08:05 +02:00
Jörg Thalheim
aad35fa464
build(deps): bump actions/create-github-app-token from 2.0.2 to 2.0.6 (#404346) 2025-05-05 16:40:45 +02:00
Martin Joerg
50f6847c35 workflows/backport: fix typo 2025-05-05 12:37:26 +00:00
dependabot[bot]
f068c68b2e
build(deps): bump cachix/install-nix-action from 31.2.0 to 31.3.0
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 31.2.0 to 31.3.0.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Changelog](https://github.com/cachix/install-nix-action/blob/master/RELEASE.md)
- [Commits](754537aaed...5261181216)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 11:37:17 +00:00
dependabot[bot]
77ea92cfca
build(deps): bump actions/create-github-app-token from 2.0.2 to 2.0.6
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 2.0.2 to 2.0.6.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](3ff1caaa28...df432ceedc)

---
updated-dependencies:
- dependency-name: actions/create-github-app-token
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-05 11:36:15 +00:00