-
Notifications
You must be signed in to change notification settings - Fork 27
81 lines (69 loc) · 2.55 KB
/
CI.yml
File metadata and controls
81 lines (69 loc) · 2.55 KB
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
81
name: HVM3 CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
hvml-pipeline:
name: HVM3 CI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Cache GHC and Cabal
uses: actions/cache@v3
id: cache-ghc
with:
path: |
~/.ghcup
key: ${{ runner.os }}-ghcup-${{ hashFiles('.github/workflows/ci.yml') }}
restore-keys: |
${{ runner.os }}-ghcup-
- name: Set up GHC and Cabal
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: '9.12.2'
cabal-version: '3.14.1.1'
setup-haskell-bin: ${{ steps.cache-ghc.outputs.cache-hit != 'true' }}
setup-haskell-cabal: ${{ steps.cache-ghc.outputs.cache-hit != 'true' }}
setup-haskell-ghc: ${{ steps.cache-ghc.outputs.cache-hit != 'true' }}
- name: Update Cabal package list
run: cabal update
- name: Install system dependencies
run: |
if [ "${{ matrix.os }}" == "ubuntu-latest" ]; then
sudo apt-get update
sudo apt-get install -y libffi-dev
elif [ "${{ matrix.os }}" == "macos-latest" ]; then
brew install libffi
fi
shell: bash
- name: Cache Cabal packages
uses: actions/cache@v3
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
~/.cabal/packages
~/.cabal/config
key: ${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal', 'cabal.project*') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cabal-${{ hashFiles('**/*.cabal', 'cabal.project*') }}-
${{ runner.os }}-cabal-
- name: Build dependencies
run: cabal build --only-dependencies
- name: Build the project
run: cabal build
- name: Lazy - Run interpreted normalization
run: cabal run hvm -- run ./examples/feat_hoas.hvm -s
- name: Lazy - Run compiled normalization
run: cabal run hvm -- run ./examples/feat_hoas.hvm -c -s
- name: Lazy - Run interpreted collapse
run: cabal run hvm -- run ./examples/enum_lam_smart.hvm -C -s
- name: Lazy - Run compiled collapse
run: cabal run hvm -- run ./examples/enum_lam_smart.hvm -C -c -s