File tree Expand file tree Collapse file tree 4 files changed +49
-12
lines changed Expand file tree Collapse file tree 4 files changed +49
-12
lines changed Original file line number Diff line number Diff line change @@ -15,18 +15,27 @@ permissions:
15
15
packages : write
16
16
17
17
jobs :
18
+ nix-matrix :
19
+ runs-on : ubuntu-latest
20
+ outputs :
21
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
22
+ steps :
23
+ - uses : actions/checkout@v4
24
+ - uses : cachix/install-nix-action@v30
25
+ - id : set-matrix
26
+ name : Generate Nix Matrix
27
+ run : |
28
+ set -Eeu
29
+ matrix="$(nix eval --json '.#githubActions.matrix')"
30
+ echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
31
+
18
32
build-run-image :
33
+ name : ${{ matrix.name }} (${{ matrix.system }})
34
+ needs : nix-matrix
35
+ runs-on : ${{ matrix.os }}
19
36
strategy :
20
37
fail-fast : false
21
- matrix :
22
- include :
23
- - runner : large-linux-x86
24
- arch : amd64
25
- - runner : large-linux-arm
26
- arch : arm64
27
- - runner : macos-latest-xlarge
28
- arch : arm64
29
- runs-on : ${{ matrix.runner }}
38
+ matrix : ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
30
39
timeout-minutes : 180
31
40
steps :
32
41
- name : Checkout Repo
@@ -103,9 +112,7 @@ jobs:
103
112
sudo rm -rf /tmp/* 2>/dev/null || true
104
113
echo "=== AFTER CLEANUP ==="
105
114
df -h
106
- - name : Build psql bundle
107
- run : >
108
- nix build ".#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem')"
115
+ - run : nix build -L '.#${{ matrix.attr }}'
109
116
env :
110
117
AWS_ACCESS_KEY_ID : ${{ env.AWS_ACCESS_KEY_ID }}
111
118
AWS_SECRET_ACCESS_KEY : ${{ env.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change 13
13
treefmt-nix . inputs . nixpkgs . follows = "nixpkgs" ;
14
14
git-hooks . url = "github:cachix/git-hooks.nix" ;
15
15
git-hooks . inputs . nixpkgs . follows = "nixpkgs" ;
16
+ nix-github-actions . url = "github:nix-community/nix-github-actions" ;
17
+ nix-github-actions . inputs . nixpkgs . follows = "nixpkgs" ;
16
18
} ;
17
19
18
20
outputs =
35
37
nix/nixpkgs.nix
36
38
nix/packages
37
39
nix/overlays
40
+ nix/github-actions.nix
38
41
] ;
39
42
} ) ;
40
43
}
Original file line number Diff line number Diff line change
1
+ { inputs , ... } :
2
+ {
3
+ flake . githubActions = inputs . nix-github-actions . lib . mkGithubMatrix {
4
+ checks = inputs . nixpkgs . lib . getAttrs [ "x86_64-linux" ] inputs . self . checks ;
5
+ } ;
6
+ }
You can’t perform that action at this time.
0 commit comments