Commit Graph

977 Commits

Author SHA1 Message Date
Silvan Mosberger
7d83f668ae workflows/eval-lib-tests: Run on maintainer changes
The lib tests also check maintainers, not doing so can cause problems: https://github.com/NixOS/nixpkgs/pull/379894

(cherry picked from commit ec32f93eb2)
2025-02-12 09:48:33 +05:30
dependabot[bot]
4400768b94 build(deps): bump actions/create-github-app-token from 1.11.1 to 1.11.3
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.1 to 1.11.3.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](c1a285145b...67e27a7eb7)

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

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 95e123c783)
2025-02-10 12:58:19 +00:00
Wolfgang Walther
5ec6b119e3 workflows/eval: rename BASE_SHA to TARGET_SHA
To be in line with the terminology introduced in the README.md in the
same folder.

(cherry picked from commit 93df51fa33)
2025-02-04 09:37:25 +00:00
Wolfgang Walther
0efb3c5f14 workflows/eval: fail hard without target run
Without a target run, we won't get any rebuild labels, rebuild counts or
maintainer pings. This might have been correct before #373935, but by
now we run eval on all commits on the target branch, so we should treat
it as a failure if we can't find the run.

(cherry picked from commit 86a38d48fb)
2025-02-04 09:37:25 +00:00
Wolfgang Walther
3823e5928f workflows/eval: no maintainer reviews in draft mode
(cherry picked from commit 21b5113509)
2025-02-01 10:59:20 +00:00
John Titor
85ff67a2c2
workflows/backport: switch to new variables
As per https://github.com/NixOS/org/issues/54, new variables are now NIXPKGS_CI_APP_ID and NIXPKGS_CI_APP_PRIVATE_KEY.

(cherry picked from commit f697628305)
2025-02-01 11:41:35 +01:00
John Titor
0e8dc9b927
workflows/periodic-merges: explicitly inherit the secrets
Apparently since we are callling a reusable workflow here, we need to explicitly pass the secrets. :(

(cherry picked from commit 38ebbf7c4f)
2025-02-01 11:41:35 +01:00
John Titor
e4326da195
workflows/periodic-merges: use nixpkgs-ci's token
(cherry picked from commit 6ab6314d06)
2025-02-01 11:41:35 +01:00
Wolfgang Walther
4c2a7e35a1
workflows/periodic-merge: move fork condition to calling workflow
Apparently the skipping needs to happen on the calling workflow,
otherwise those workflows show up as "failed" in forks instead of
skipped.

(cherry picked from commit d725592cd1)
2025-02-01 11:41:34 +01:00
Wolfgang Walther
78ff538815
workflows/periodic-merge: support merge bases in re-usable workflow
(cherry picked from commit ba09688dc8)
2025-02-01 11:41:34 +01:00
Wolfgang Walther
434e4058cd
workflows/periodic-merge: create re-usable workflow
Less repetition, more consistency.

(cherry picked from commit 51b8ad2191)
2025-02-01 11:41:34 +01:00
Wolfgang Walther
ad26714e77
workflows: basic consistency in formatting workflows
Same top-level ordering of keys / empty lines and same indentation for
yaml lists. One blank line between each step.

Makes it easier to read and compare the workflows.

(cherry picked from commit 88afad8833)
2025-02-01 11:41:34 +01:00
NAHO
d73550426d
workflows: update Ubuntu runner to ubuntu-24.04
Link: https://github.com/actions/runner-images/issues/10636
(cherry picked from commit fcfbe6fff4)
2025-02-01 11:41:33 +01:00
NAHO
73d745f1c2
workflows: lock Ubuntu runner to ubuntu-22.04
Lock the Ubuntu runner to ubuntu-22.04 to avoid accidental updates [1]
and increase reproducibility.

[1]: https://github.com/actions/runner-images/issues/10636

(cherry picked from commit 2660dd1e71)
2025-02-01 11:41:33 +01:00
sternenseemann
dea6a2abae
workflows/periodic-merge: merge merge-base into haskell-updates
Since haskell-updates is based on master, but merges into staging, we
need to base it on a merge-base of staging and master. See #361143.

I'm a bit worried that the information GitHub uses for displaying
Pull-Requests becomes stale and this will “add” commits to the PR
compared to the base anyways. We'll find out, I suppose.

(cherry picked from commit f9f5325ad9)
2025-02-01 11:41:33 +01:00
Weijia Wang
efc3df9c52
workflows: remove 24.05 merges
(cherry picked from commit f5e3261683)
2025-02-01 11:41:33 +01:00
Robert Hensing
4367d51c23 ci: Interpunction
The latter part is structurally a full sentence, if short.

(cherry picked from commit c98e26ae4e)
2025-01-19 09:49:12 +00:00
Robert Hensing
949185c80e ci: Show example nixfmt command prominently
(cherry picked from commit 3895dfe2cf)
2025-01-19 09:49:12 +00:00
dependabot[bot]
9205880adb build(deps): bump actions/upload-artifact from 4.5.0 to 4.6.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.5.0 to 4.6.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](6f51ac03b9...65c4c4a1dd)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit c254691a5b)
2025-01-19 09:25:32 +00:00
Zhong Jianxin
3dca86b9e5 workflows/codeowners-v2: only run if github.repository_owner is NixOS
Failure on fork:

```
throw new Error("Input required and not supplied: app-id");
```

(cherry picked from commit 973017d933)
2025-01-13 20:02:45 +00:00
Wolfgang Walther
e1cb028801
workflows: add README
This introduces some basic concepts used in these workflows and a common
terminology.

At the same time we remove some of the comments from various workflow
files, because they are assumed to be "general knowledge" through the
README.

(cherry picked from commit 9ea74225cc)
2025-01-11 15:07:45 +01:00
Wolfgang Walther
e2d58714c7
workflows: rename baseSha to targetSha
We currently use two different "base" commits, but the same name. One of
them is the commit in which context the pull_request_target runs. The
other is the parent of the merge commit. Those are **not** necessarily
the same - see README introduced in the next commit for details.

Renaming one of them for clarity. Since the pull_request_target related
base commit is also called like that in GitHub Actions terminology, we
rename the other. The best I could come up with is "target".

(cherry picked from commit 3e9f5c05ea)
2025-01-11 15:07:45 +01:00
Wolfgang Walther
a76426214b
workflows/{editorconfig,nix-parse}: run against release branches
It seems odd to exclude PRs against release branches for those checks -
especially when not excluding PRs against staging-** variants at the
same time.

(cherry picked from commit 58f8c536c6)
2025-01-11 15:07:17 +01:00
Wolfgang Walther
9f70c76b0b
workflows: make checks work with non-NixOS repos
No need for that limitation, which only artifically limits test-ability
of CI in forks.

Some other workflows like backports, cherry-pick checks and periodic
merges are very specific to the release branches and don't need to be
run in forks.

(cherry picked from commit b64d5e1c0c)
2025-01-11 15:07:17 +01:00
Wolfgang Walther
c2b36c94a2
workflows/eval: remove non-required "needs: attrs"
The eval-aliases job is independent of attrs already.

(cherry picked from commit 94c4c7bd3b)
2025-01-11 15:07:17 +01:00
Wolfgang Walther
f4f9df1782
workflows: basic consistency in formatting workflows
Same top-level ordering of keys / empty lines and same indentation for
yaml lists. One blank line between each step.

Makes it easier to read and compare the workflows.

(cherry picked from commit 88afad8833)
2025-01-11 15:07:10 +01:00
Wolfgang Walther
40d3bb9d5e
workflows/eval: fix actionlint
mergedSha is available from needs.get-merge-commit, not needs.attrs.
Actionlint rightfully complains about that.

The code still works as expected because nixpkgs/ is checked out at
mergedSha, so the diff will be between mergedSha and baseSha.

(cherry picked from commit 72fd375d1c)
2025-01-11 15:06:26 +01:00
Wolfgang Walther
0183246069
workflows/check-maintainers-sorted: Use .yml extension for consistency
All other workflows do - and most importantly actionlint only runs on
.yml files!

(cherry picked from commit fcb24b90d0)
2025-01-11 15:06:26 +01:00
Wolfgang Walther
7add43e251
workflows/check-shell: use job matrix
(cherry picked from commit 4d00c68aa4)
2025-01-11 15:06:26 +01:00
Wolfgang Walther
ae4066f827
workflows/basic-eval: remove
This seems to be unused. It can be triggered manually, but is this
really done?

Is this superseded by the new eval checks or should we instead run this
regularly?

(cherry picked from commit aa7335ca5f)
2025-01-11 15:06:26 +01:00
dependabot[bot]
aaa48e94ff build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1 (#371397)
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](https://github.com/actions/create-github-app-token/compare/v1.11.0...c1a285145b9d317df6ced56c09f525b5c2b6f755)

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

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit ebdb307d51)
2025-01-11 13:57:45 +00:00
John Titor
a6ea384dc0
workflows/eval: add swap to tackle recent borderline OOM
Removed in https://github.com/NixOS/nixpkgs/pull/356023#discussion_r1844961453

Due to https://github.com/NixOS/nixpkgs/issues/355847#issuecomment-2566688172 https://github.com/NixOS/nixpkgs/issues/355847#issuecomment-2559907806 https://github.com/NixOS/nixpkgs/issues/355847#issuecomment-2543915995

(cherry picked from commit 9ccdc413e4)
2025-01-11 14:46:13 +01:00
NAHO
c2ab54c6c5
workflows: lock macOS runner to macos-14
(cherry picked from commit dbd20ce0eb)
2025-01-11 14:44:11 +01:00
NAHO
1a7793d1ac
workflows: update Ubuntu runner to ubuntu-24.04
Link: https://github.com/actions/runner-images/issues/10636
(cherry picked from commit fcfbe6fff4)
2025-01-11 14:44:09 +01:00
NAHO
fae0c7b0eb
workflows: lock Ubuntu runner to ubuntu-22.04
Lock the Ubuntu runner to ubuntu-22.04 to avoid accidental updates [1]
and increase reproducibility.

[1]: https://github.com/actions/runner-images/issues/10636

(cherry picked from commit 2660dd1e71)
2025-01-11 14:44:00 +01:00
John Titor
8ccc1cf1e2
actions/no-channel-pr: re run when base branch is updated
Additionally, no permissions are needed so set it to an empty set
Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com>
(cherry picked from commit 3ff50a219b)
2025-01-11 14:41:35 +01:00
Wolfgang Walther
410510d3f9
workflows/eval: add eval summary before requesting reviewers
This is to ensure that the eval summary is still set as commit status,
even when the review requests fail due to too many reviewers.

(cherry picked from commit 3c9794d06e)
2025-01-06 22:10:23 +01:00
Wolfgang Walther
bc3c6a9edd
ci/request-reviews: share code to request reviewers from gh api
This makes it easier to add ofborg's request-1-by-1 logic, where failed
requests are OK for edge cases.

(cherry picked from commit 62779fbfa4)
2025-01-04 19:34:22 +01:00
Wolfgang Walther
981355c729
workflows/eval: make "requesting maintainer reviews" separate step
Odd to have this in the "Tagging pull request" step, which is only about
labels otherwise.

(cherry picked from commit 2e6119462e)
2025-01-04 19:34:22 +01:00
Wolfgang Walther
ff1e788238
ci/request-reviews: rename code-owner related files
Now that we have maintainer reviews as well, be a bit more explicit
about naming.

(cherry picked from commit cf0616fec6)
2025-01-04 19:34:22 +01:00
Silvan Mosberger
0fb6e88fe3
workflows/eval: Minor cleanup
The ${{ }} syntax is best avoided in scripts. While it wouldn't be a
problem here, let's do this for consistency

(cherry picked from commit ab248be504)
2025-01-04 14:55:27 +01:00
Silvan Mosberger
b4b6ddedf2
workflows/eval: Reuse process-reviewers.sh
Filters out the PR author and avoids rerequesting reviews from people
that already left a review. In a future commit, this can be expanded to
also avoid requesting reviews from people not in the org

(cherry picked from commit 0ebab0bcca)
2025-01-03 21:33:45 +01:00
Silvan Mosberger
0916ec48fb workflows/eval: Use maintainer GitHub IDs for review requests of changed packages
The handles can change over time and there's nothing guaranteeing the
ones in the maintainer list are up-to-date. In comparison GitHub IDs
never change.

(cherry picked from commit b844cba4e6)
2025-01-03 20:30:51 +00:00
Silvan Mosberger
db45da12a8 workflows/eval: Request reviews from changed package maintainers
Currently we need to rely on ofborg requesting reviews from package
maintainers, which takes a while with ofborg's eval queue. Since
recently we're doing faster evaluations with GitHub Actions, which contain all
necessary information to determine reviewers of changed packages the
same way ofborg does. This PR takes advantage of that.

(cherry picked from commit b9d800d468)
2025-01-03 20:30:51 +00:00
Perchun Pak
8ab38ea732 .github/workflows/ofborg-pending.yml: delete (#370427)
Ofborg is dead for a few days, so this workflow is useless.

https://discourse.nixos.org/t/infrastructure-announcement-the-future-of-ofborg-your-help-needed/56025
(cherry picked from commit a748f4ce07)
2025-01-03 17:59:02 +00:00
dependabot[bot]
fddbd3e980
build(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4.4.3 to 4.5.0.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b4b15b8c7c...6f51ac03b9)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit abd256e12b)
2025-01-01 04:35:47 -05:00
dependabot[bot]
fc3d9f32e2
build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1
Bumps [actions/create-github-app-token](https://github.com/actions/create-github-app-token) from 1.11.0 to 1.11.1.
- [Release notes](https://github.com/actions/create-github-app-token/releases)
- [Commits](5d869da34e...c1a285145b)

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

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 4c4e9337fa)
2025-01-01 04:35:47 -05:00
Wolfgang Walther
bf9c1332ee
workflows/eval: evaluate all systems to completion on failure
Failing fast hides system-specific evaluation failures, because all of
the currently 4 jobs appear as failed.

(cherry picked from commit a9dbb26f48)
2025-01-01 04:35:46 -05:00
Silvan Mosberger
f775bccc18
workflows/eval: Catch empty conclusion
Sometimes the conclusion is empty when it's still
running/pending or so, which needs to be caught, otherwise it can exit
preemptively: https://github.com/NixOS/nixpkgs/pull/364308#issuecomment-2550179941

Co-Authored-By: Reno Dakota <paparodeo@proton.me>
(cherry picked from commit 79dca9a646)
2025-01-01 04:35:46 -05:00
Silvan Mosberger
300a4854ca
workflows/eval: Improve debuggabilitiy
Sometimes successful workflows trigger that condition,
see https://github.com/NixOS/nixpkgs/actions/runs/12278493443/job/34260660227:

    Comparing against "https://github.com/NixOS/nixpkgs/actions/runs/12278495895"
    Workflow not done, waiting 10 seconds before checking again
    Workflow was not successful, cannot make comparison

Even though

    $ gh api /repos/NixOS/nixpkgs/actions/runs/12278495895 --jq .conclusion
    success

Let's print the conclusion when it's not "success" to debug this.

(cherry picked from commit aae821d4fe)
2025-01-01 04:35:45 -05:00