-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (73 loc) · 2.29 KB
/
integrate.yaml
File metadata and controls
80 lines (73 loc) · 2.29 KB
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
78
79
80
on:
push:
paths:
- '**.hs'
- '**.nix'
- 'nix/sources.json'
- 'majority-multisign.cabal'
branches:
- master
- staging
pull_request:
paths:
- '**.hs'
- '**.nix'
- 'nix/sources.json'
- 'majority-multisign.cabal'
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.4
name: Cache Stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-formatting
restore-keys: ${{ runner.os }}-stack-
- run: stack install fourmolu
name: Setup
- run: ls && ./.github/format.sh
name: "Run fourmolu"
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.4
name: Cache Stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-lint
restore-keys: ${{ runner.os }}-stack-
- run: stack install hlint
name: Setup
- run: ~/.local/bin/hlint $(git ls-tree -r HEAD --full-tree --name-only | grep -E '.*\.hs')
name: Lint
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: cachix/install-nix-action@v13
name: Set up nix and IOHK cache
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ= iohk.cachix.org-1:DpRUyj7h7V830dp/i6Nti+NEO2/nhblbov/8MW7Rqoo= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
substituters = https://hydra.iohk.io https://iohk.cachix.org https://cache.nixos.org/
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v10
with:
name: mlabs
authToken: ${{ secrets.CACHIXKEY }}
- name: Cache cabal folder
id: cabal
uses: actions/cache@v2.1.4
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal
- name: Build the full ci derivation
# `-L` prints the full build log: https://github.com/NixOS/nix/issues/1904#issuecomment-520187939
run: nix build -L .#check.x86_64-linux