-
Notifications
You must be signed in to change notification settings - Fork 3
80 lines (80 loc) · 2.14 KB
/
ci.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: categorifier-c
on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
jobs:
nix-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
- "ghc8107"
- "ghc901"
experimental: [false]
include:
- ghc: "ghc921"
os: ubuntu-latest
experimental: true
- ghc: "ghcHEAD"
os: ubuntu-latest
experimental: true
steps:
- name: Install nix
uses: cachix/install-nix-action@v16
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Checkout repositiory code
uses: actions/checkout@v3
- name: List files
run: |
ls ${{ github.workspace }}
- name: build
run: |
nix build --print-build-logs .#${{ matrix.ghc }}_all || ${{ matrix.experimental }}
# We currently want to maintain at least non-nix build with up-to-date hackage index to check
# the traditional builds keeps working.
cabal-build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ["8.10.1", "8.10.2", "8.10.4", "8.10.7", "9.0.1", "9.0.2"]
env:
CONFIG: "--enable-tests --enable-benchmarks"
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "3.6.0.0"
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
- run: cabal v2-build all $CONFIG
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/hlint-setup@v2
with:
version: '3.4'
- uses: haskell/actions/hlint-run@v2
with:
path: '["./"]'
fail-on: status
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mrkkrp/ormolu-action@v5