Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport release-24.11] GitHub Actions PRs #369914

Merged
merged 19 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
f80ecb0
ci/editorconfig-v2: useless use of cat
Mic92 Nov 22, 2024
934a91c
ci/check-nixf-tidy: replace sed with variable substitution
Mic92 Nov 22, 2024
f228013
add actionlint script
Mic92 Nov 22, 2024
5191c1a
ci/check-shell: only run if `shell.nix` or `./ci/**` is changed
Mic92 Nov 29, 2024
e30b136
ci/check-shell: fix `ci/**` path
azuwis Nov 30, 2024
887ea68
workflows/check-nix-format: Improve error message
infinisil Aug 26, 2024
1388b51
build(deps): bump korthout/backport-action from 3.0.2 to 3.1.0
dependabot[bot] Aug 26, 2024
3f4f84f
ci/eval: re-implement compare in nix
GaetanLepage Dec 7, 2024
ff9bb62
ci/eval: fix compare label assignment
GaetanLepage Dec 10, 2024
e88b48d
ci/eval: add rebuildsByPlatform to the comparison result
GaetanLepage Dec 9, 2024
c1553b5
ci/eval: allow precisely choosing which systems to evaluate for (eval…
GaetanLepage Dec 14, 2024
300a485
workflows/eval: Improve debuggabilitiy
infinisil Dec 11, 2024
7f0d2b1
ci/eval: Avoid noise for failing attribute evals
infinisil Dec 12, 2024
f775bcc
workflows/eval: Catch empty conclusion
infinisil Dec 18, 2024
bb3bf66
ci/eval/compare: truncate step summary to 1024k
Mic92 Dec 12, 2024
bf9c133
workflows/eval: evaluate all systems to completion on failure
wolfgangwalther Dec 21, 2024
fc3d9f3
build(deps): bump actions/create-github-app-token from 1.11.0 to 1.11.1
dependabot[bot] Dec 23, 2024
fddbd3e
build(deps): bump actions/upload-artifact from 4.4.3 to 4.5.0
dependabot[bot] Dec 23, 2024
db5a0ad
ci: Label 10.rebuild-*-stdenv (#369102)
dasJ Dec 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
# Use a GitHub App to create the PR so that CI gets triggered
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ vars.BACKPORT_APP_ID }}
Expand All @@ -28,7 +28,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
- name: Create backport PRs
uses: korthout/backport-action@bd410d37cdcae80be6d969823ff5a225fe5c833f # v3.0.2
uses: korthout/backport-action@be567af183754f6a5d831ae90f648954763f17f5 # v3.1.0
with:
# Config README: https://github.com/korthout/backport-action#backport-action
copy_labels_pattern: 'severity:\ssecurity'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-nix-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:

if (( "${#unformattedFiles[@]}" > 0 )); then
echo "Some new/changed Nix files are not properly formatted"
echo "Please go to the Nixpkgs root directory, run \`nix-shell\`, then:"
echo "Please format them using the Nixpkgs-specific \`nixfmt\` by going to the Nixpkgs root directory, running \`nix-shell\`, then:"
echo "nixfmt ${unformattedFiles[*]@Q}"
echo "Make sure your branch is up to date with master, rebase if not."
echo "If you're having trouble, please ping @NixOS/nix-formatting"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-nixf-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
echo "$errors"
else
# just print in plain text
echo "$errors" | sed 's/^:://'
echo "${errors/::/}"
echo # add one empty line
fi
failedFiles+=("$dest")
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/check-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: "Check shell"

on:
pull_request_target:
paths:
- 'shell.nix'
- 'ci/**'

permissions: {}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeowners-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
- name: Build codeowners validator
run: nix-build base/ci -A codeownersValidator

- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ vars.OWNER_RO_APP_ID }}
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
# This is intentional, because we need to request the review of owners as declared in the base branch.
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
- uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
id: app-token
with:
app-id: ${{ vars.OWNER_APP_ID }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/editorconfig-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/c473cc8714710179df205b153f4e9fa007107ff9.tar.gz
- name: Checking EditorConfig
run: |
cat "$HOME/changed_files" | nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
< "$HOME/changed_files" nix-shell -p editorconfig-checker --run 'xargs -r editorconfig-checker -disable-indent-size'
- if: ${{ failure() }}
run: |
echo "::error :: Hey! It looks like your changes don't follow our editorconfig settings. Read https://editorconfig.org/#download to configure your editor so you never see this error again."
13 changes: 7 additions & 6 deletions .github/workflows/eval.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
echo "systems=$(<result/systems.json)" >> "$GITHUB_OUTPUT"

- name: Upload the list of all attributes
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: paths
path: result/*
Expand Down Expand Up @@ -81,6 +81,7 @@ jobs:
runs-on: ubuntu-latest
needs: [ attrs, get-merge-commit ]
strategy:
fail-fast: false
matrix:
system: ${{ fromJSON(needs.attrs.outputs.systems) }}
steps:
Expand Down Expand Up @@ -110,7 +111,7 @@ jobs:
# If it uses too much memory, slightly decrease chunkSize

- name: Upload the output paths and eval stats
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: intermediate-${{ matrix.system }}
path: result/*
Expand Down Expand Up @@ -144,7 +145,7 @@ jobs:
-o prResult

- name: Upload the combined results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: result
path: prResult/*
Expand All @@ -165,14 +166,14 @@ jobs:
runId=$(jq .id <<< "$run")
conclusion=$(jq -r .conclusion <<< "$run")

while [[ "$conclusion" == null ]]; do
while [[ "$conclusion" == null || "$conclusion" == "" ]]; do
echo "Workflow not done, waiting 10 seconds before checking again"
sleep 10
conclusion=$(gh api /repos/"$REPOSITORY"/actions/runs/"$runId" --jq '.conclusion')
done

if [[ "$conclusion" != "success" ]]; then
echo "Workflow was not successful, cannot make comparison"
echo "Workflow was not successful (conclusion: $conclusion), cannot make comparison"
exit 0
fi

Expand Down Expand Up @@ -202,7 +203,7 @@ jobs:

- name: Upload the combined results
if: steps.baseRunId.outputs.baseRunId
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
with:
name: comparison
path: comparison/*
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/lint-actions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash actionlint shellcheck -I nixpkgs=../..
set -euo pipefail

SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$SCRIPT_DIR/../.."
actionlint
8 changes: 5 additions & 3 deletions ci/eval/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ The code in this directory is used by the [eval.yml](../../.github/workflows/eva
Furthermore it also allows local evaluation using
```
nix-build ci -A eval.full \
--max-jobs 4
--cores 2
--arg chunkSize 10000
--max-jobs 4 \
--cores 2 \
--arg chunkSize 10000 \
--arg evalSystems '["x86_64-linux" "aarch64-darwin"]'
```

- `--max-jobs`: The maximum number of derivations to run at the same time. Only each [supported system](../supportedSystems.nix) gets a separate derivation, so it doesn't make sense to set this higher than that number.
- `--cores`: The number of cores to use for each job. Recommended to set this to the amount of cores on your system divided by `--max-jobs`.
- `chunkSize`: The number of attributes that are evaluated simultaneously on a single core. Lowering this decreases memory usage at the cost of increased evaluation time. If this is too high, there won't be enough chunks to process them in parallel, and will also increase evaluation time.
- `evalSystems`: The set of systems for which `nixpkgs` should be evaluated. Defaults to the four official platforms (`x86_64-linux`, `aarch64-linux`, `x86_64-darwin` and `aarch64-darwin`).

A good default is to set `chunkSize` to 10000, which leads to about 3.6GB max memory usage per core, so suitable for fully utilising machines with 4 cores and 16GB memory, 8 cores and 32GB memory or 16 cores and 64GB memory.

Expand Down
164 changes: 0 additions & 164 deletions ci/eval/compare.jq

This file was deleted.

Loading
Loading