-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (44 loc) · 1.34 KB
/
buildAndRunTests.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
name: Haskell CI
on:
push:
branches: [ "master", "next" ]
pull_request:
branches: [ "master", "next" ]
jobs:
build:
runs-on: ubuntu-latest
container:
image: "alpine:3.19"
steps:
- name: prep alpine
run: |
apk add build-base newlib-riscv-none-elf ghc cabal wget libffi-dev git tar
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Cache
uses: actions/cache@v3
env:
cache-name: cache-cabal
with:
path: ~/.local/state/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: install Haskell dependencies
run: |
cabal update
cabal build --only-dependencies --enable-tests
- name: build and install riscv-tiny
run: cabal install --overwrite-policy=always
- name: run unit tests
run: cabal test
- name: build riscv-tests executor
run: |
cd riscv-tests
cabal build
- name: compile and run riscv-tests
run: env RISCV_PREFIX=riscv-none-elf- ./riscv-tests/run.sh