Skip to content

Commit af6faf8

Browse files
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.
1 parent 962836d commit af6faf8

File tree

2 files changed

+4
-39
lines changed

2 files changed

+4
-39
lines changed

.github/workflows/eval.yml

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -19,37 +19,10 @@ jobs:
1919
get-merge-commit:
2020
uses: ./.github/workflows/get-merge-commit.yml
2121

22-
attrs:
23-
name: Attributes
24-
runs-on: ubuntu-24.04-arm
25-
needs: get-merge-commit
26-
if: needs.get-merge-commit.outputs.mergedSha
27-
steps:
28-
- name: Check out the PR at the test merge commit
29-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
30-
with:
31-
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
32-
path: nixpkgs
33-
34-
- name: Install Nix
35-
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
36-
with:
37-
extra_nix_config: sandbox = true
38-
39-
- name: Evaluate the list of all attributes
40-
run: |
41-
nix-build nixpkgs/ci -A eval.attrpathsSuperset
42-
43-
- name: Upload the list of all attributes
44-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
45-
with:
46-
name: paths
47-
path: result/*
48-
4922
outpaths:
5023
name: Outpaths
5124
runs-on: ubuntu-24.04-arm
52-
needs: [ attrs, get-merge-commit ]
25+
needs: [ get-merge-commit ]
5326
strategy:
5427
fail-fast: false
5528
matrix:
@@ -62,12 +35,6 @@ jobs:
6235
sudo mkswap /swap
6336
sudo swapon /swap
6437
65-
- name: Download the list of all attributes
66-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
67-
with:
68-
name: paths
69-
path: paths
70-
7138
- name: Check out the PR at the test merge commit
7239
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
7340
with:
@@ -85,7 +52,6 @@ jobs:
8552
run: |
8653
nix-build nixpkgs/ci -A eval.singleSystem \
8754
--argstr evalSystem "$MATRIX_SYSTEM" \
88-
--arg attrpathFile ./paths/paths.json \
8955
--arg chunkSize 10000
9056
# If it uses too much memory, slightly decrease chunkSize
9157
@@ -98,7 +64,7 @@ jobs:
9864
process:
9965
name: Process
10066
runs-on: ubuntu-24.04-arm
101-
needs: [ outpaths, attrs, get-merge-commit ]
67+
needs: [ outpaths, get-merge-commit ]
10268
outputs:
10369
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
10470
steps:
@@ -200,7 +166,7 @@ jobs:
200166
tag:
201167
name: Tag
202168
runs-on: ubuntu-24.04-arm
203-
needs: [ attrs, process ]
169+
needs: [ process ]
204170
if: needs.process.outputs.targetRunId
205171
permissions:
206172
pull-requests: write

ci/eval/default.nix

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ let
6565
# because `--argstr system` would only be passed to the ci/default.nix file!
6666
evalSystem,
6767
# The path to the `paths.json` file from `attrpathsSuperset`
68-
attrpathFile,
68+
attrpathFile ? "${attrpathsSuperset}/paths.json",
6969
# The number of attributes per chunk, see ./README.md for more info.
7070
chunkSize,
7171
checkMeta ? true,
@@ -286,7 +286,6 @@ let
286286
name = evalSystem;
287287
path = singleSystem {
288288
inherit quickTest evalSystem chunkSize;
289-
attrpathFile = attrpathsSuperset + "/paths.json";
290289
};
291290
}) evalSystems
292291
);

0 commit comments

Comments
 (0)