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 @@ -19,18 +19,27 @@ concurrency:
19
19
cancel-in-progress : ${{ github.event_name == 'pull_request' }}
20
20
21
21
jobs :
22
+ nix-matrix :
23
+ runs-on : ubuntu-latest
24
+ outputs :
25
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
26
+ steps :
27
+ - uses : actions/checkout@v4
28
+ - uses : cachix/install-nix-action@v30
29
+ - id : set-matrix
30
+ name : Generate Nix Matrix
31
+ run : |
32
+ set -Eeu
33
+ matrix="$(nix eval --json '.#githubActions.matrix')"
34
+ echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
35
+
22
36
build-run-image :
37
+ name : ${{ matrix.name }} (${{ matrix.system }})
38
+ needs : nix-matrix
39
+ runs-on : ${{ matrix.os }}
23
40
strategy :
24
41
fail-fast : false
25
- matrix :
26
- include :
27
- - runner : blacksmith-32vcpu-ubuntu-2404
28
- arch : amd64
29
- - runner : blacksmith-32vcpu-ubuntu-2404-arm
30
- arch : arm64
31
- - runner : macos-latest-xlarge
32
- arch : arm64
33
- runs-on : ${{ matrix.runner }}
42
+ matrix : ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
34
43
timeout-minutes : 180
35
44
steps :
36
45
- name : Checkout Repo
@@ -108,9 +117,7 @@ jobs:
108
117
sudo rm -rf /tmp/* 2>/dev/null || true
109
118
echo "=== AFTER CLEANUP ==="
110
119
df -h
111
- - name : Build psql bundle
112
- run : >
113
- nix build ".#checks.$(nix eval --raw --impure --expr 'builtins.currentSystem')"
120
+ - run : nix build -L '.#${{ matrix.attr }}'
114
121
env :
115
122
AWS_ACCESS_KEY_ID : ${{ env.AWS_ACCESS_KEY_ID }}
116
123
AWS_SECRET_ACCESS_KEY : ${{ env.AWS_SECRET_ACCESS_KEY }}
Original file line number Diff line number Diff line change 14
14
git-hooks . url = "github:cachix/git-hooks.nix" ;
15
15
git-hooks . inputs . nixpkgs . follows = "nixpkgs" ;
16
16
nixpkgs-go124 . url = "github:Nixos/nixpkgs/d2ac4dfa61fba987a84a0a81555da57ae0b9a2b0" ;
17
+ nix-github-actions . url = "github:nix-community/nix-github-actions" ;
18
+ nix-github-actions . inputs . nixpkgs . follows = "nixpkgs" ;
17
19
} ;
18
20
19
21
outputs =
36
38
nix/nixpkgs.nix
37
39
nix/packages
38
40
nix/overlays
41
+ nix/github-actions.nix
39
42
] ;
40
43
} ) ;
41
44
}
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