forked from adl-lang/adl
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.19 KB
/
ci.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
name: Build and test
on:
pull_request:
push:
branches:
- master
jobs:
build:
name: CI
runs-on: ubuntu-latest
steps:
- name: Setup Stack
uses: haskell/actions/setup@v2
with:
ghc-version: '8.8.4' # Exact version of ghc to use
# cabal-version: 'latest'. Omitted, but defaults to 'latest'
enable-stack: true
stack-version: 'latest'
- name: Clone project
uses: actions/checkout@v3
- name: Cache ~/.stack
uses: actions/cache@v3
with:
path: ~/.stack
key: ${{ runner.os }}-stack-global-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}
restore-keys: |
${{ runner.os }}-stack-global-
- name: Cache .stack-work
uses: actions/cache@v3
with:
path: haskell/.stack-work
key: ${{ runner.os }}-stack-work-${{ hashFiles('stack.yaml') }}-${{ hashFiles('package.yaml') }}-${{ hashFiles('**/*.hs') }}
restore-keys: |
${{ runner.os }}-stack-work-
- name: Build and run tests
run: "cd haskell; stack build --fast adl-compiler; stack test --fast --no-terminal adl-compiler"