Commit Graph

239 Commits

Author SHA1 Message Date
Wolfgang Walther
edd12277b0 workflows/eval: diff outpaths immediately
This moves the diff of outpaths into the outpaths job, mainly as a
preparation to allow future improvements. For example, this will allow
running the purity release checks only on changed outpaths instead of
the whole eval.

This also removes the inefficiency introduced in the last commit about
uploading the intermediate paths twice. Now, only the diff is passed on.

Also, technically, the diff is now run in parallel across 4 jobs. This
should be *slightly* faster than before, where outpaths from all systems
were combined first and then diffed. It's probably only a few seconds,
though.

(cherry picked from commit 8a39ce4a48)
2025-05-25 19:05:43 +00:00
Wolfgang Walther
2614df1e9a workflows/eval: consistently avoid "result" in arguments
Everything is a result, especially when nix-build uses "result" as its
default output. This becomes confusing, when re-wiring the different
parts later.

Thus, consistently name those things after some of their properties and
avoid the term result.

(cherry picked from commit b2579d36ff)
2025-05-25 19:05:42 +00:00
Wolfgang Walther
8eef775407 workflows/nixpkgs-vet: use nixpkgs-vet from pinned nixpkgs
We have added nixpkgs-vet as a regular package to nixpkgs a while ago,
so we can now use it from pinned nixpkgs. This avoids pulling a
platform-specific binary version from upstream.

This change also allows to run the tool easily locally, the same way as
other tools:

  nix-build ci -A nixpkgs-vet

This will do a full check of the repo with the exception of
nixpkgs-vet's "ratchet" checks: Those depend on having two branches to
compare, but the default is to only look at the head branch. Those
ratchet checks will still be run in CI, though.

(cherry picked from commit 942c377476)
2025-05-25 15:10:33 +00:00
Emily
2b83710504 OWNERS: add myself to lib/licenses.nix
As one of the resident Nixpkgs licensing pedants and reviewer of
several recent changes to this file I think it makes sense to make
the de facto the de jure.

(cherry picked from commit 856cb3108a)
2025-05-24 11:14:03 +00:00
Wolfgang Walther
3302c73cb7 ci/eval.combine: avoid parsing of plain text file into JSON
Instead of parsing a plain text file with jq, we can make nix-env output
JSON directly, which is significantly faster.

This saves about 8 out of 10 seconds for the combine step.

(cherry picked from commit 138393e0ba)
2025-05-24 10:46:35 +00:00
Wolfgang Walther
c7ccdf0990 ci/eval.compare: use lib from pinned nixpkgs
compare/maintainers.nix needs to access the current checkout to check
attrpaths, but makes the mistake of using lib from that checkout as
well. All other code in ci/ uses the pinned nixpkgs instance, so
maintainers.nix should do so as well.

(cherry picked from commit d87d760dfa)
2025-05-24 10:46:35 +00:00
Wolfgang Walther
6c95fb2548 ci/eval: improve api when calling in steps
Previously, `eval.full` organized the results for the supported systems
in a specific layout, i.e. with a folder with one subfolder per system.
Then, `eval.combine` relied on that.

When using `eval.singleSystem` and `eval.combine` directly, the caller
was responsible to recreate the same layout. This is annoying and
error-prone to do, when downloading artifacts from CI to recreate some
steps locally.

With this change, all the artifacts can be downloaded and extracted into
the same folder - because the result from `eval.singleSystem` already
contains the <system-name>/ subfolder.

(cherry picked from commit eccd9564ab)
2025-05-24 10:46:35 +00:00
Wolfgang Walther
e2a2997127 workflows/get-merge-commit: move to composite action
We don't need a separate workflow anymore, because we don't need to skip
dependent jobs on failures anymore. The biggest failure mode was
"conflict" previously, but we resolved that on the last commit. The
remaining failure modes are so rare, that it's OK to just fail the jobs
in this case instead of marking them as "skipped". Especially, because
the resolve-merge-commit job would have previously failed anyway.

By moving this to an action we avoid running separate jobs each time we
need the merge commit. This also makes the check list in PRs much
cleaner.

(cherry picked from commit e48d9d6174)
2025-05-24 10:25:43 +00:00
Wolfgang Walther
79ea708cc0 workflows/get-merge-commit: inline get-merge-commit.sh script as github-script
The reason this was a separate shell script was, that this would be
included in multiple workflows separately. But a while ago this had been
changed to a re-usable workflow, so we can just as well inline the
script.

This also allows us to use actions/github-script, which makes for a much
more readable script than the bash script before.

(cherry picked from commit 277f7b998c)
2025-05-24 10:25:43 +00:00
Wolfgang Walther
dbb5ea9c26 ci/eval: remove left-over stats.json
This seems to be a left-over from before the performance comparison was
changed to a difference-per-chunk analysis.

(cherry picked from commit edaf51cb83)
2025-05-22 19:08:27 +00:00
JuliusFreudenberger
8e3671e458 teleport: move to by-name
Make teleport built by the by-name structure in package.nix.
The versioned attributes are defined in their own package.nix
in by-name using overrides.
Also change reference in ci/OWNERS

(cherry picked from commit a01b51d00b)
2025-05-19 02:40:51 +00:00
Wolfgang Walther
3a0323589f [Backport release-25.05] ci/eval/nix: 2.24 -> ... (#408130) 2025-05-17 21:28:12 +00:00
Robert Hensing
b9176e15ca ci/nix: 2.24 -> 2.28
(cherry picked from commit 529143f3d7)
2025-05-17 20:54:30 +00:00
Winter
f478418afd ci/eval/compare: manage the "by: package-maintainer" label
While OfBorg is still adding these, it takes a much longer time to do so
compared to the eval action. Since we're adding rebuild labels, I think
it'd be nice to just do it within the eval action.

(cherry picked from commit d52066e2b1)
2025-05-17 20:49:33 +00:00
Winter
f309fef2f3 ci/eval: allow configuration of the system to eval attrpaths on
Right now, there are some paths that don't even get exposed to certain
systems (notably Darwin, but some outliers exist for Linux such as the
Darwin-specific Hackage overlay) for one reason or another, usually
because of assertions like `stdenv.isLinux`. To catch these scenarios,
this change implements a way to specify the system to evaluate attrpaths
on, and makes it default to the system that we're evaluating outpaths
for.

(cherry picked from commit 6b18b3d67b)
2025-05-17 17:50:02 +00:00
Winter
4d113f8044 ci: Update pinned Nixpkgs
From the nixpkgs-unstable channel: https://hydra.nixos.org/eval/1815229#tabs-inputs
2025-05-13 21:12:32 -04:00
Wolfgang Walther
1893f5439e workflows/check-format: run on all files
This was run on .nix files only, but we recently added keep-sorted,
editorconfig-checker and actionlint to treefmt, so CI needs to check all
files instead.
2025-05-13 08:24:25 +02:00
SomeoneSerge
918bbc36dd OWNERS: add cuda-maintainers 2025-05-12 23:03:03 +00:00
Winter
940c27de00 OWNERS: remove ehmry
User was banned [0], so do this to stop the CI from failing.

[0]: 0629826825
2025-05-12 17:47:07 -04: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
Jörg Thalheim
53a79ee500 workflows/check-format: add actionlint (#406114) 2025-05-11 12:55:51 +02:00
Jörg Thalheim
7fd771ee97 ci: allow running jobs locally (#404466) 2025-05-11 12:28:04 +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
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
1cf2d6085b OWNERS: add postgresqlTestHook to NixOS/postgres team 2025-05-11 10:44:19 +02:00
John Titor
2a573ad886 ci/OWNERS: add warp-terminal maintainers as they were not getting pings previously
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
2025-05-11 09:04:45 +05:30
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
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
Winter
a7eef26e86 check-meta: wrap maintainers attribute to include team members (#402991) 2025-05-07 17:11:15 -04:00
Johannes Kirschbauer
4f64ebd02b ci/eval-stats: sort output table by metric name 2025-05-07 18:05:07 +02:00
Johannes Kirschbauer
e9f649806a ci/compare: nix stats comparison (#404731) 2025-05-06 22:31:46 +02:00
Johannes Kirschbauer
0d584f7c8f ci/compare: nix stats comparison
Displays stats table in the step-summary if there are no added/removed packages
2025-05-06 21:49:18 +02:00
Morgan Jones
92bd743239 ci/eval: use correct maintainer and team positions
We need to pass through the maintainers and teams positions from the
original meta so pings work correctly, since check-meta clobbers the
original attribute positions in them.

Tested with `maintainers/scripts/get-maintainer-pings-between.sh` on a
handful of major packages maintained by both individuals and teams.
2025-05-05 23:45:13 -07:00
awwpotato
509efdedbd treewide: move to by-name 2025-05-05 08:49:04 -07:00
JuliusFreudenberger
eb5312b583 OWNERS: add owners for teleport files 2025-05-02 21:50:19 +03:00
Johannes Kirschbauer
a3520e9577 Revert "ci/compare: Bring back nix stats comparison" 2025-05-01 23:02:38 +02:00
Johannes Kirschbauer
78e8992345 ci/compare: nix stats comparison
Displays stats table in the step-summary if there are no added/removed packages
2025-05-01 22:41:12 +02:00
Johannes Kirschbauer
fa69ce05d6 ci/eval: output per chunk stats 2025-05-01 20:52:24 +02:00
Anthony ROUSSEL
b2cf5b453a OWNERS: add owners for OctoDNS 2025-04-29 21:14:55 +02:00
Tristan Ross
88f0276649 check-meta: add a teams attribute (#394797) 2025-04-20 16:17:39 -07:00
Wolfgang Walther
de0b31cc84 teams/haskell: add wolfgangwalther 2025-04-20 11:35:33 +02:00
Morgan Jones
e5306ea0ae ci/eval/compare: support optional byName argument
Sometimes it is quite useful to output names instead of GitHub IDs, e.g.
for maintainer scripts that show you who you would ping. Add this as an
option, but keep the existing default.
2025-04-17 23:54:29 -07:00
Tristan Ross
a71ef34c09 ci/eval/compare: add meta.teams 2025-04-17 23:54:29 -07:00