Skip to content

build

build #526

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'
jobs:
build:
name: ${{ matrix.os }} / GHC ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
ghc:
- '7.10'
- '8.0'
- '8.2'
- '8.4'
- '8.6'
- '8.8'
- '8.10'
- '9.0'
- '9.2'
- '9.4'
- '9.6'
- '9.8'
include:
- os: macos-latest
ghc: latest
- os: windows-latest
ghc: latest
steps:
- uses: actions/checkout@v3
- uses: hspec/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
- name: Install dependencies
run: |
cabal update
cabal configure --enable-tests --enable-benchmarks # NOTE: --enable-tests is necessary due to https://github.com/haskell/cabal/issues/5079
cabal build --only-dependencies
- name: Build
run: cabal build all
- name: Run tests
run: cabal test all --test-show-details=direct
env:
HSPEC_OPTIONS: --color
success:
needs: build
runs-on: ubuntu-latest
if: always() # this is required as GitHub considers "skipped" jobs as "passed" when checking branch protection rules
steps:
- run: exit 1
if: needs.build.result != 'success'