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.

Changed files
+4 -39
.github
workflows
ci
+3 -37
.github/workflows/eval.yml
···
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
-
attrs:
-
name: Attributes
-
runs-on: ubuntu-24.04-arm
-
needs: get-merge-commit
-
if: needs.get-merge-commit.outputs.mergedSha
-
steps:
-
- name: Check out the PR at the test merge commit
-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
-
with:
-
ref: ${{ needs.get-merge-commit.outputs.mergedSha }}
-
path: nixpkgs
-
-
- name: Install Nix
-
uses: cachix/install-nix-action@526118121621777ccd86f79b04685a9319637641 # v31
-
with:
-
extra_nix_config: sandbox = true
-
-
- name: Evaluate the list of all attributes
-
run: |
-
nix-build nixpkgs/ci -A eval.attrpathsSuperset
-
-
- name: Upload the list of all attributes
-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
-
with:
-
name: paths
-
path: result/*
-
outpaths:
name: Outpaths
runs-on: ubuntu-24.04-arm
-
needs: [ attrs, get-merge-commit ]
strategy:
fail-fast: false
matrix:
···
sudo mkswap /swap
sudo swapon /swap
-
- name: Download the list of all attributes
-
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
-
with:
-
name: paths
-
path: paths
-
- name: Check out the PR at the test merge commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
···
run: |
nix-build nixpkgs/ci -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
-
--arg attrpathFile ./paths/paths.json \
--arg chunkSize 10000
# If it uses too much memory, slightly decrease chunkSize
···
process:
name: Process
runs-on: ubuntu-24.04-arm
-
needs: [ outpaths, attrs, get-merge-commit ]
outputs:
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
steps:
···
tag:
name: Tag
runs-on: ubuntu-24.04-arm
-
needs: [ attrs, process ]
if: needs.process.outputs.targetRunId
permissions:
pull-requests: write
···
get-merge-commit:
uses: ./.github/workflows/get-merge-commit.yml
outpaths:
name: Outpaths
runs-on: ubuntu-24.04-arm
+
needs: [ get-merge-commit ]
strategy:
fail-fast: false
matrix:
···
sudo mkswap /swap
sudo swapon /swap
- name: Check out the PR at the test merge commit
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
···
run: |
nix-build nixpkgs/ci -A eval.singleSystem \
--argstr evalSystem "$MATRIX_SYSTEM" \
--arg chunkSize 10000
# If it uses too much memory, slightly decrease chunkSize
···
process:
name: Process
runs-on: ubuntu-24.04-arm
+
needs: [ outpaths, get-merge-commit ]
outputs:
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
steps:
···
tag:
name: Tag
runs-on: ubuntu-24.04-arm
+
needs: [ process ]
if: needs.process.outputs.targetRunId
permissions:
pull-requests: write
+1 -2
ci/eval/default.nix
···
# because `--argstr system` would only be passed to the ci/default.nix file!
evalSystem,
# The path to the `paths.json` file from `attrpathsSuperset`
-
attrpathFile,
# The number of attributes per chunk, see ./README.md for more info.
chunkSize,
checkMeta ? true,
···
name = evalSystem;
path = singleSystem {
inherit quickTest evalSystem chunkSize;
-
attrpathFile = attrpathsSuperset + "/paths.json";
};
}) evalSystems
);
···
# because `--argstr system` would only be passed to the ci/default.nix file!
evalSystem,
# The path to the `paths.json` file from `attrpathsSuperset`
+
attrpathFile ? "${attrpathsSuperset}/paths.json",
# The number of attributes per chunk, see ./README.md for more info.
chunkSize,
checkMeta ? true,
···
name = evalSystem;
path = singleSystem {
inherit quickTest evalSystem chunkSize;
};
}) evalSystems
);