-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (74 loc) · 1.89 KB
/
checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
on:
push:
branches:
- main
pull_request:
jobs:
matrix:
permissions:
contents: read
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: |
accept-flake-config = true
- id: generate
name: generate Matrix
run: |
set -Eeu
echo "matrix=$(nix eval --json '.#githubActions.matrix')" >> "$GITHUB_OUTPUT"
check-eval:
permissions:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: |
accept-flake-config = true
- name: nix flake check
run: |
nix flake check \
--print-build-logs \
--show-trace
check-build-matrix:
name: ${{ matrix.name }}.${{ matrix.system }}
needs: matrix
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{fromJSON(needs.matrix.outputs.matrix)}}
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v16
with:
extra-conf: |
accept-flake-config = true
- uses: cachix/cachix-action@v15
with:
name: mirkolenz
authToken: ${{ secrets.CACHIX_TOKEN }}
- name: nix build
run: |
nix build \
--print-build-logs \
--show-trace \
--no-link \
'.#${{ matrix.attr }}'
check-build:
needs: check-build-matrix
runs-on: ubuntu-latest
if: always()
steps:
- run: |
result="${{ needs.check-build-matrix.result }}"
if [[ $result == "success" ]]; then
exit 0
else
exit 1
fi