managed cap eval #44
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: Build and publish application binaries | |
on: | |
workflow_dispatch: | |
push: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
ghc: ['8.10.7'] | |
cabal: ['3.8'] | |
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# Haskell Setup | |
- name: Install GHC ${{matrix.ghc}} and Cabal ${{matrix.cabal}} | |
uses: haskell/actions/setup@v2 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Confirm GHC and Cabal installation | |
run: | | |
ghc --version | |
cabal --version | |
# Project Setup | |
- name: Create cabal.project.local | |
shell: bash | |
run: | | |
cat > cabal.project.local <<EOF | |
tests: True | |
EOF | |
- name: Print cabal.project.local | |
shell: bash | |
run: cat cabal.project.local | |
- uses: actions/cache@v3 | |
name: Cache dist-newstyle | |
with: | |
path: | | |
~/.cabal/packages | |
~/.cabal/store | |
dist-newstyle | |
key: ${{ matrix.os }}-${{ matrix.ghc }}-4-cabal | |
# Build | |
- name: Update package database | |
run: cabal update | |
- name: Configure build | |
run: | | |
cabal build --dry-run | |
cabal freeze | |
- name: Build | |
shell: bash | |
run: cabal build | |
- name: Test | |
shell: bash | |
run: cabal test |