aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/check.yml
blob: 79e9442860ed7efe88b42c92420093efae19185d (plain)
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
name: Nix flake check
on: pull_request

jobs:
  get-matrix:
    runs-on: [self-hosted, nix]
    outputs:
      check-matrix: ${{ steps.set-check-matrix.outputs.matrix }}
    steps:
      - uses: actions/checkout@v4

      - id: set-check-matrix
        run: echo "matrix=$(nix eval --json .#check-matrix.x86_64-linux)" >> $GITHUB_OUTPUT

  check:
    needs: get-matrix
    name: check ${{ matrix.check }}
    runs-on: [self-hosted, nix]
    strategy:
      fail-fast: false
      # this matrix consists of the names of all checks defined in flake.nix
      matrix: ${{fromJson(needs.get-matrix.outputs.check-matrix)}}
    steps:
      - uses: actions/checkout@v4

      - name: check
        run: nix build -L .#checks.x86_64-linux.${{ matrix.check }}