This repository has been archived by the owner on Aug 11, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
74 lines (74 loc) · 2.23 KB
/
integrate.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
on:
push:
paths:
- '**.hs'
- '**.nix'
- 'nix/sources.json'
- '**.cabal'
- '.github/workflows/*'
branches:
- master
- staging
pull_request:
paths:
- '**.hs'
- '**.nix'
- 'nix/sources.json'
- '**.cabal'
- '.github/workflows/*'
jobs:
check-formatting:
name: Check source format
runs-on: ubuntu-latest
steps:
- name: Checkout base repo
uses: actions/checkout@v2
- name: Cache Stack
uses: actions/[email protected]
with:
path: ~/.stack
key: ${{ runner.os }}-stack-formatting
restore-keys: ${{ runner.os }}-stack-
- name: Install fourmolu
run: stack install fourmolu
- name: Run fourmolu
run: ./.github/format.sh
lint:
name: Check HLint hints
runs-on: ubuntu-latest
steps:
- name: Checkout base repo
uses: actions/checkout@v2
- name: Set up HLint
uses: haskell/actions/hlint-setup@v1
with:
version: 3.3.6
- name: Lint
run: ./.github/lint.sh
build:
name: Build all sublibraries
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/
- uses: cachix/cachix-action@v10
with:
name: mlabs
authToken: ${{ secrets.CACHIX_KEY }}
- name: Cache cabal folder
id: cabal
uses: actions/[email protected]
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ runner.os }}-cabal
- name: Build the full ci derivation
run: nix develop --extra-experimental-features nix-command --extra-experimental-features flakes --command bash -c "cabal new-build all && cabal new-test all"