-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.51 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
53
54
55
name: Haskell CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
WASMTIME_VERSION: "1.0.1"
jobs:
build:
name: Build Executable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2
- uses: haskell/actions/hlint-setup@v2
- name: Cache
uses: actions/cache@v3
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ hashFiles('**/*.cabal') }}
restore-keys: ${{ runner.os }}-build-
- name: Install Wasmtime ${{ env.WASMTIME_VERSION }}
uses: ./.github/actions/install-wasmtime
with:
version: ${{ env.WASMTIME_VERSION }}
- name: Update Local Hackage Database
run: cabal update
- name: Build
run: make build
- name: Lint
uses: haskell/actions/hlint-run@v2
with:
fail-on: warning
- name: Install
run: make destdir=. install
- name: Upload Executable
uses: actions/upload-artifact@v2
with:
name: metroc-bin
path: ./metroc
if-no-files-found: error
- name: Run Metro tests
run: ./metroc test
- name: Run examples/print.metro
run: echo "stdout" | ./metroc run examples/print.metro
- name: Run examples/arithmetics.metro
run: ./metroc run --assertions examples/arithmetics.metro
- name: Run examples/murmur3.metro
run: ./metroc run --assertions examples/murmur3.metro
- name: Run examples/uint.metro
run: ./metroc run --assertions examples/uint.metro