mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-09 19:13:26 +03:00
workflows/eval: diff outpaths immediately
This moves the diff of outpaths into the outpaths job, mainly as a preparation to allow future improvements. For example, this will allow running the purity release checks only on changed outpaths instead of the whole eval. This also removes the inefficiency introduced in the last commit about uploading the intermediate paths twice. Now, only the diff is passed on. Also, technically, the diff is now run in parallel across 4 jobs. This should be *slightly* faster than before, where outpaths from all systems were combined first and then diffed. It's probably only a few seconds, though.
This commit is contained in:
parent
a6b659b08a
commit
8a39ce4a48
5 changed files with 117 additions and 79 deletions
46
.github/workflows/eval.yml
vendored
46
.github/workflows/eval.yml
vendored
|
@ -135,12 +135,23 @@ jobs:
|
|||
github-token: ${{ github.token }}
|
||||
merge-multiple: true
|
||||
|
||||
- name: Upload the output paths and eval stats
|
||||
- name: Compare outpaths against the target branch
|
||||
if: steps.targetRunId.outputs.targetRunId
|
||||
env:
|
||||
MATRIX_SYSTEM: ${{ matrix.system }}
|
||||
run: |
|
||||
nix-build untrusted/ci -A eval.diff \
|
||||
--arg beforeDir ./target \
|
||||
--arg afterDir "$(readlink ./merged)" \
|
||||
--argstr evalSystem "$MATRIX_SYSTEM" \
|
||||
--out-link diff
|
||||
|
||||
- name: Upload outpaths diff and stats
|
||||
if: steps.targetRunId.outputs.targetRunId
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
||||
with:
|
||||
name: target-${{ matrix.system }}
|
||||
path: target/*
|
||||
name: diff-${{ matrix.system }}
|
||||
path: diff/*
|
||||
|
||||
process:
|
||||
name: Process
|
||||
|
@ -148,18 +159,11 @@ jobs:
|
|||
needs: [ prepare, outpaths ]
|
||||
if: needs.prepare.outputs.targetSha
|
||||
steps:
|
||||
- name: Download output paths and eval stats for all systems (PR)
|
||||
- name: Download output paths and eval stats for all systems
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
pattern: merged-*
|
||||
path: merged
|
||||
merge-multiple: true
|
||||
|
||||
- name: Download output paths and eval stats for all systems (target)
|
||||
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
|
||||
with:
|
||||
pattern: target-*
|
||||
path: target
|
||||
pattern: diff-*
|
||||
path: diff
|
||||
merge-multiple: true
|
||||
|
||||
- name: Check out the PR at the target commit
|
||||
|
@ -173,18 +177,11 @@ jobs:
|
|||
with:
|
||||
extra_nix_config: sandbox = true
|
||||
|
||||
- name: Combine all output paths and eval stats (PR)
|
||||
- name: Combine all output paths and eval stats
|
||||
run: |
|
||||
nix-build trusted/ci -A eval.combine \
|
||||
--arg evalDir ./merged \
|
||||
--out-link combinedMerged
|
||||
|
||||
- name: Combine all output paths and eval stats (target)
|
||||
if: needs.prepare.outputs.targetSha
|
||||
run: |
|
||||
nix-build trusted/ci -A eval.combine \
|
||||
--arg evalDir ./target \
|
||||
-o combinedTarget
|
||||
--arg diffDir ./diff \
|
||||
--out-link combined
|
||||
|
||||
- name: Compare against the target branch
|
||||
env:
|
||||
|
@ -196,8 +193,7 @@ jobs:
|
|||
|
||||
# Use the target branch to get accurate maintainer info
|
||||
nix-build trusted/ci -A eval.compare \
|
||||
--arg beforeDir "$(realpath combinedTarget)" \
|
||||
--arg afterDir "$(realpath combinedMerged)" \
|
||||
--arg combinedDir "$(realpath ./combined)" \
|
||||
--arg touchedFilesJson ./touched-files.json \
|
||||
--argstr githubAuthorId "$AUTHOR_ID" \
|
||||
--out-link comparison
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue