@@ -3,67 +3,32 @@ on: [push, pull_request]
3
3
name : CI
4
4
5
5
jobs :
6
- check :
7
- name : Check
6
+ nix-matrix :
8
7
runs-on : ubuntu-latest
8
+ outputs :
9
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
9
10
steps :
10
- - uses : actions/checkout@v3
11
- - uses : actions-rs/toolchain@v1
12
- with :
13
- profile : minimal
14
- toolchain : stable
15
- override : true
16
- - uses : actions-rs/cargo@v1
17
- with :
18
- command : check
19
-
20
- # TODO: the build for this started failing in 1b34a74891423e118c567368c95b7e04f3b9ca63
21
- # test:
22
- # name: Test Suite
23
- # runs-on: ubuntu-latest
24
- # steps:
25
- # - uses: actions/checkout@v2
26
- # - uses: actions-rs/toolchain@v1
27
- # with:
28
- # profile: minimal
29
- # toolchain: stable
30
- # override: true
31
- # - uses: actions-rs/cargo@v1
32
- # with:
33
- # command: test
11
+ - uses : actions/checkout@v4
12
+ - uses : cachix/install-nix-action@v30
13
+ - id : set-matrix
14
+ name : Generate Nix Matrix
15
+ run : |
16
+ set -Eeu
17
+ matrix="$(nix eval --json '.#githubActions.matrix')"
18
+ echo "matrix=$matrix" >> "$GITHUB_OUTPUT"
34
19
35
- fmt :
36
- name : Rustfmt
37
- runs-on : ubuntu-latest
38
- steps :
39
- - uses : actions/checkout@v3
40
- - uses : actions-rs/toolchain@v1
41
- with :
42
- profile : minimal
43
- toolchain : stable
44
- override : true
45
- - run : rustup component add rustfmt
46
- - uses : actions-rs/cargo@v1
47
- with :
48
- command : fmt
49
-
50
- cargo-deny :
51
- runs-on : ubuntu-latest
52
- steps :
53
- - uses : actions/checkout@v3
54
- - uses : EmbarkStudios/cargo-deny-action@v1
55
-
56
- clippy :
57
- name : Clippy
58
- runs-on : ubuntu-latest
20
+ check :
21
+ name : ${{ matrix.name }} (${{ matrix.system }})
22
+ needs : nix-matrix
23
+ runs-on : ${{ matrix.os }}
24
+ strategy :
25
+ matrix : ${{fromJSON(needs.nix-matrix.outputs.matrix)}}
59
26
steps :
60
- - uses : actions/checkout@v3
61
- - uses : actions-rs/toolchain@v1
62
- with :
63
- profile : minimal
64
- toolchain : stable
65
- override : true
66
- - run : rustup component add clippy
67
- - uses : actions-rs/cargo@v1
27
+ - uses : actions/checkout@v4
28
+ - uses : cachix/install-nix-action@v30
29
+ - name : Authenticate with Cachix
30
+ uses : cachix/cachix-action@v15
68
31
with :
69
- command : clippy
32
+ name : rgit
33
+ authToken : ${{ secrets.CACHIX_AUTH_TOKEN }}
34
+ - run : nix build -L '.#${{ matrix.attr }}'
0 commit comments