@@ -6,12 +6,12 @@ permissions:
6
6
contents : read
7
7
8
8
jobs :
9
- tests :
10
- name : eval-check
9
+ attrs :
10
+ name : Attrs
11
11
runs-on : ubuntu-latest
12
- strategy :
13
- matrix :
14
- system : [x86_64-linux, aarch64-linux, aarch64-darwin, x86_64-darwin]
12
+ outputs :
13
+ systems : ${{ steps.systems.outputs.systems }}
14
+ mergedSha : ${{ steps.merged.outputs.mergedSha }}
15
15
steps :
16
16
# Important: Because of `pull_request_target`, this doesn't check out the PR,
17
17
# but rather the base branch of the PR, which is needed so we don't run untrusted code
@@ -20,26 +20,66 @@ jobs:
20
20
path : base
21
21
sparse-checkout : ci
22
22
- name : Resolving the merge commit
23
+ id : merged
23
24
env :
24
25
GH_TOKEN : ${{ github.token }}
25
26
run : |
26
27
if mergedSha=$(base/ci/get-merge-commit.sh ${{ github.repository }} ${{ github.event.number }}); then
27
28
echo "Checking the merge commit $mergedSha"
28
- echo "mergedSha=$mergedSha" >> "$GITHUB_ENV "
29
+ echo "mergedSha=$mergedSha" >> "$GITHUB_OUTPUT "
29
30
else
30
31
# Skipping so that no notifications are sent
31
32
echo "Skipping the rest..."
32
33
fi
33
34
rm -rf base
34
35
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35
36
# Add this to _all_ subsequent steps to skip them
36
- if : env .mergedSha
37
+ if : steps.merged .mergedSha
37
38
with :
38
39
ref : ${{ env.mergedSha }}
40
+ path : nixpkgs
41
+
42
+ - uses : cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
43
+ if : outputs.merged.mergedSha
44
+
45
+ - id : systems
46
+ if : steps.merged.mergedSha
47
+ run : |
48
+ nix-build nixpkgs/ci -A eval.evalPlan
49
+ echo "systems=$(<result/systems.json)" > "GITHUB_OUTPUT"
50
+
51
+ - uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 v4.4.3
52
+ if : steps.merged.mergedSha
53
+ with :
54
+ name : eval-plan
55
+ path : result/systems
56
+
57
+ eval :
58
+ name : Eval
59
+ runs-on : ubuntu-latest
60
+ needs : attrs
61
+ if : needs.attrs.outputs.mergedSha
62
+ strategy :
63
+ matrix :
64
+ system : ${{ fromJSON(needs.attrs.outputs.systems) }}
65
+ steps :
66
+ - uses : actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
67
+ with :
68
+ name : eval-plan
69
+ path : systems
70
+
71
+ - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
72
+ with :
73
+ ref : ${{ needs.attrs.outputs.mergedSha }}
74
+ path : nixpkgs
39
75
40
76
- uses : cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 # v30
41
- if : env.mergedSha
42
77
43
78
- name : Check eval
44
- if : env.mergedSha
45
- run : ./ci/eval-nixpkgs.sh --system "${{ matrix.system }}"
79
+ run : nix-build nixpkgs/ci -A eval.singleJob --arg jobDir systems/${{ matrix.system }}
80
+
81
+ - uses : actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 v4.4.3
82
+ if : outputs.merged.mergedSha
83
+ with :
84
+ name : result-${ matrix.system }}
85
+ path : result/paths
0 commit comments