diff --git a/.github/workflows/eval.yml b/.github/workflows/eval.yml index 0063ad1a12e9..1432aec3b0d1 100644 --- a/.github/workflows/eval.yml +++ b/.github/workflows/eval.yml @@ -74,14 +74,15 @@ jobs: run: | nix-build untrusted/ci -A eval.singleSystem \ --argstr evalSystem "$MATRIX_SYSTEM" \ - --arg chunkSize 10000 + --arg chunkSize 10000 \ + --out-link merged # If it uses too much memory, slightly decrease chunkSize - name: Upload the output paths and eval stats uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: intermediate-${{ matrix.system }} - path: result/* + name: merged-${{ matrix.system }} + path: merged/* process: name: Process @@ -93,8 +94,8 @@ jobs: - name: Download output paths and eval stats for all systems uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: - pattern: intermediate-* - path: intermediate + pattern: merged-* + path: merged merge-multiple: true - name: Check out the PR at the test merge commit @@ -111,14 +112,14 @@ jobs: - name: Combine all output paths and eval stats run: | nix-build untrusted/ci -A eval.combine \ - --arg resultsDir ./intermediate \ - -o prResult + --arg evalDir ./merged \ + --out-link combined - name: Upload the combined results uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: - name: result - path: prResult/* + name: combined + path: combined/* - name: Get target run id if: needs.prepare.outputs.targetSha @@ -156,8 +157,8 @@ jobs: - uses: actions/download-artifact@v4 if: steps.targetRunId.outputs.targetRunId with: - name: result - path: targetResult + name: combined + path: target merge-multiple: true github-token: ${{ github.token }} run-id: ${{ steps.targetRunId.outputs.targetRunId }} @@ -174,15 +175,15 @@ jobs: # Use the target branch to get accurate maintainer info nix-build trusted/ci -A eval.compare \ - --arg beforeResultDir ./targetResult \ - --arg afterResultDir "$(realpath prResult)" \ + --arg beforeDir ./target \ + --arg afterDir "$(realpath combined)" \ --arg touchedFilesJson ./touched-files.json \ --argstr githubAuthorId "$AUTHOR_ID" \ - -o comparison + --out-link comparison cat comparison/step-summary.md >> "$GITHUB_STEP_SUMMARY" - - name: Upload the combined results + - name: Upload the comparison results if: steps.targetRunId.outputs.targetRunId uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: @@ -211,7 +212,7 @@ jobs: permission-members: read permission-pull-requests: write - - name: Download process result + - name: Download comparison result uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 with: name: comparison diff --git a/ci/eval/compare/default.nix b/ci/eval/compare/default.nix index 68456135629a..01c735a4c218 100644 --- a/ci/eval/compare/default.nix +++ b/ci/eval/compare/default.nix @@ -7,8 +7,8 @@ python3, }: { - beforeResultDir, - afterResultDir, + beforeDir, + afterDir, touchedFilesJson, githubAuthorId, byName ? false, @@ -20,7 +20,7 @@ let --- Inputs: - - beforeResultDir, afterResultDir: The evaluation result from before and after the change. + - beforeDir, afterDir: The evaluation result from before and after the change. They can be obtained by running `nix-build -A ci.eval.full` on both revisions. --- @@ -83,8 +83,8 @@ let data = builtins.unsafeDiscardStringContext raw; in builtins.fromJSON data; - beforeAttrs = getAttrs beforeResultDir; - afterAttrs = getAttrs afterResultDir; + beforeAttrs = getAttrs beforeDir; + afterAttrs = getAttrs afterDir; # Attrs # - keys: "added", "changed" and "removed" @@ -149,8 +149,8 @@ runCommand "compare" maintainers = builtins.toJSON maintainers; passAsFile = [ "maintainers" ]; env = { - BEFORE_DIR = "${beforeResultDir}"; - AFTER_DIR = "${afterResultDir}"; + BEFORE_DIR = "${beforeDir}"; + AFTER_DIR = "${afterDir}"; }; } '' diff --git a/ci/eval/default.nix b/ci/eval/default.nix index 2e5ac008312f..f60dd46efd3e 100644 --- a/ci/eval/default.nix +++ b/ci/eval/default.nix @@ -193,9 +193,9 @@ let combine = { - resultsDir, + evalDir, }: - runCommand "combined-result" + runCommand "combined-eval" { nativeBuildInputs = [ jq @@ -205,11 +205,11 @@ let mkdir -p $out # Combine output paths from all systems - cat ${resultsDir}/*/paths.json | jq -s add > $out/outpaths.json + cat ${evalDir}/*/paths.json | jq -s add > $out/outpaths.json mkdir -p $out/stats - for d in ${resultsDir}/*; do + for d in ${evalDir}/*; do cp -r "$d"/stats-by-chunk $out/stats/$(basename "$d") done ''; @@ -225,8 +225,8 @@ let quickTest ? false, }: let - results = symlinkJoin { - name = "results"; + evals = symlinkJoin { + name = "evals"; paths = map ( evalSystem: singleSystem { @@ -236,7 +236,7 @@ let }; in combine { - resultsDir = results; + evalDir = evals; }; in