Skip to content

Build with Cabal

Build with Cabal #461

Workflow file for this run

name: Build with Cabal
on:
workflow_dispatch:
push:
schedule:
- cron: '0 8 * * *'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['9.0', '9.2', '9.4', '9.6', '9.8']
cabal: ['3.10']
os: ['ubuntu-22.04', 'ubuntu-20.04', 'macOS-latest']
steps:
# Setup
- name: Checkout repository
uses: actions/checkout@v3
- name: Install GHC and Cabal
uses: haskell/actions/setup@v2
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- name: Configure project
run: |
cat > cabal.project.local <<EOF
package merkle-log
documentation: True
benchmarks: True
tests: True
EOF
# Restore Packages from Caches
- uses: actions/cache@v3
name: Cache dist-newstyle
with:
path: |
~/.cabal/packages
~/.cabal/store
dist-newstyle
key: ${{ matrix.os }}-${{ matrix.ghc }}-cabal
# Build
- name: Update package database
run: cabal update
- name: Configure build
run: |
cabal build all --dry-run
cabal freeze
- name: Install build dependencies
run: cabal build --only-dependencies
- name: Build library
run: cabal build
# Tests
- name: Run Tests
run: cabal test