Skip to content

build

build #613

Workflow file for this run

name: build
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
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-latest
ghc:
- '9.8'
- '9.10'
- '9.12'
include:
- os: macos-latest
ghc: system
- os: windows-latest
ghc: system
steps:
- uses: actions/checkout@v4
- 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'