Move verilator calls to inside Haskell test program #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lava CI | |
on: [push] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
linux: | |
name: Lava CI | |
runs-on: ubuntu-24.04 | |
timeout-minutes: | |
60 | |
continue-on-error: ${{ matrix.allow-failure }} | |
strategy: | |
matrix: | |
include: | |
- compiler: ghc-9.8.2 | |
compilerVersion: 9.8.2 | |
allow-failure: false | |
- compiler: ghc-9.4.8 | |
compilerVersion: 9.4.8 | |
allow-failure: false | |
fail-fast: false | |
steps: | |
- name: Attempt to restore GHC compiler from cache. | |
uses: actions/cache/restore@v4 | |
with: | |
key: ${{ runner.os }}-${{ matrix.compiler }} | |
path: ~/.ghcup/bin | |
- name: Install GHC, cabal and verilator. | |
run: | | |
echo "HOME = " $HOME | |
echo "github.workspace = " ${{ github.workspace }} | |
echo "GITHUB_WORKSPACE = " $GITHUB_WORKSPACE | |
export GHCUP_INSTALL_BASE_PREFIX=$HOME | |
export PATH=$HOME/.ghcup/bin:$PATH | |
mkdir -p "$HOME/.ghcup/bin" | |
sudo chmod a+x "$HOME/.ghcup/bin/ghcup" | |
ghcup install ghc ${{ matrix.compilerVersion }} | |
ghcup set ghc ${{ matrix.compilerVersion }} | |
ghc --version | |
ghcup install cabal 3.10.3.0 | |
cabal v2-update | |
sudo apt-get update | |
sudo apt-get install -y verilator | |
verilator --version | |
- name: Cache GHC compiler. | |
uses: actions/cache/save@v4 | |
with: | |
key: ${{ runner.os }}-${{ matrix.compiler }} | |
path: ~/.ghcup/bin | |
- name: Checkout Lava GitHub source | |
uses: actions/checkout@v4 | |
with: | |
path: source | |
- name: Build and test Lava | |
run: | | |
cd source | |
cabal v2-test | |