Skip to content

Miscellaneous cleanup #40

Miscellaneous cleanup

Miscellaneous cleanup #40

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