-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.34 KB
/
haskell.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
name: Haskell
on:
push:
branches: [master]
paths-ignore:
- 'LICENSE'
- 'README.md'
pull_request:
branches: [master]
jobs:
build:
strategy:
matrix:
resolver:
- stack
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install the Haskell Stack
run: |
mkdir -p ~/.local/bin
curl -L https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- name: Cache .stack
id: cache-stack
uses: actions/cache@v2
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-${{ hashFiles(format('{0}.yaml', matrix.resolver)) }}
restore-keys: |
${{ runner.os }}-${{ matrix.resolver }}
${{ runner.os }}-
- name: Install GHC
run: |
export PATH=$HOME/.local/bin:$PATH
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal --install-ghc setup
- name: Install dependencies
run: |
export PATH=$HOME/.local/bin:$PATH
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal build --only-dependencies --fast
- name: Build
run: |
export PATH=$HOME/.local/bin:$PATH
stack --stack-yaml=${{ matrix.resolver }}.yaml --no-terminal build --fast