forked from kl0tl/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (75 loc) · 2.4 KB
/
test.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
81
82
83
84
85
86
name: Haskell CI
on: [push]
jobs:
build:
name: build
defaults:
run:
shell: bash
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Install Haskell
uses: haskell/actions/setup@v1
id: setup-haskell
with:
ghc-version: 8.10.7
cabal-version: 3.6.2.0
- name: Setup cabal path (posix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run:
echo "${HOME}/.cabal/bin" >> $GITHUB_PATH
- name: Setup cabal path (windows)
if: matrix.os == 'windows-latest'
run:
echo "${HOME}/AppData/Roaming/cabal/bin" >> $GITHUB_PATH
- uses: actions/setup-node@v1
with:
node-version: '16'
- name: Install bower
run: npm install --global bower
- name: Check versions
run: |
node --version
npm --version
bower --version
- name: Cache
uses: actions/cache@v1
env:
cache-name: cache-cabal
with:
path: ~/.cabal
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Update cabal
run: cabal update
- uses: actions/checkout@v2
- name: Install zephyr's dependencies
run: |
cabal install --install-method=copy --overwrite-policy=always purescript
cabal build --only-dependencies
- name: Purs version (posix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
purs --version
- name: Purs version (windows)
if: matrix.os == 'windows-latest'
run: |
purs.exe --version
- name: Build zephyr
run: |
cp cabal.project.ci cabal.project.local
cabal build exe:zephyr
- name: Run tests (posix)
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: cabal run zephyr-test -- -m generators -m evaluate -m corefn -m test-lib
- name: Run tests (windows)
if: matrix.os == 'windows-latest'
# We dont' run `-m test-lib` as on posix; Getting bower path on Windows
# recognised by `readProcessWithExitCode` is impossible.
run: cabal run zephyr-test -- -m generators -m evaluate -m corefn