mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
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.
This commit is contained in:
40
.github/workflows/eval.yml
vendored
40
.github/workflows/eval.yml
vendored
@@ -19,37 +19,10 @@ jobs:
|
||||
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 ]
|
||||
needs: [ get-merge-commit ]
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -62,12 +35,6 @@ jobs:
|
||||
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:
|
||||
@@ -85,7 +52,6 @@ jobs:
|
||||
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
|
||||
|
||||
@@ -98,7 +64,7 @@ jobs:
|
||||
process:
|
||||
name: Process
|
||||
runs-on: ubuntu-24.04-arm
|
||||
needs: [ outpaths, attrs, get-merge-commit ]
|
||||
needs: [ outpaths, get-merge-commit ]
|
||||
outputs:
|
||||
targetRunId: ${{ steps.targetRunId.outputs.targetRunId }}
|
||||
steps:
|
||||
@@ -200,7 +166,7 @@ jobs:
|
||||
tag:
|
||||
name: Tag
|
||||
runs-on: ubuntu-24.04-arm
|
||||
needs: [ attrs, process ]
|
||||
needs: [ process ]
|
||||
if: needs.process.outputs.targetRunId
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
Reference in New Issue
Block a user