-
Notifications
You must be signed in to change notification settings - Fork 3
64 lines (51 loc) · 1.75 KB
/
check.yml
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
# SPDX-FileCopyrightText: 2023 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: MPL-2.0
name: Nix flake check
on: push
jobs:
validate:
runs-on: [self-hosted, nix]
steps:
- uses: actions/checkout@v3
- name: xrefcheck
run: nix run github:serokell/xrefcheck
- name: reuse
run: nix build -L .#checks.x86_64-linux.reuse-lint
# Run step even if the previous one has failed
if: success() || failure()
- name: hlint
run: nix build -L .#checks.x86_64-linux.hlint
if: success() || failure()
- name: stylish-haskell
run: nix build -L .#checks.x86_64-linux.stylish-haskell
if: success() || failure()
- name: check-trailing-whitespace
run: nix build -L .#checks.x86_64-linux.trailing-whitespace
if: success() || failure()
- name: check-hpack
run: nix build -L .#checks.x86_64-linux.hpack
if: success() || failure()
# Export JSON serialized ghc-versions
ghc-versions:
runs-on: [self-hosted, nix]
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
run: echo "matrix=$(nix eval --json .#ghc-matrix.x86_64-linux)" >> $GITHUB_OUTPUT
build-and-test:
needs: ghc-versions
name: ghc${{ matrix.ghc }}
runs-on: [self-hosted, nix]
strategy:
fail-fast: false
matrix: ${{fromJson(needs.ghc-versions.outputs.matrix)}}
steps:
- uses: actions/checkout@v3
- name: build
run: nix build -L .#checks.x86_64-linux.ghc${{ matrix.ghc }}:build-all --keep-going
- name: test
run: nix build -L .#checks.x86_64-linux.ghc${{ matrix.ghc }}:test-all --keep-going
if: success() || failure()