Skip to content

Reformatting, for consistency #42

Reformatting, for consistency

Reformatting, for consistency #42

Workflow file for this run

name: Tests
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
# As of 19 October 2024, ubuntu-latest and windows-latest come with
# Stack 3.1.1. macos-13 and macos-latest do not come with Haskell tools.
jobs:
tests:
name: Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-13 # x86_64
- macos-latest # AArch64
resolver:
- stack-ghc-8.10.7.yaml
- stack-ghc-9.0.2.yaml
- stack-ghc-9.2.8.yaml
- stack-ghc-9.4.7.yaml
- stack-ghc-9.6.6.yaml
- stack-ghc-9.8.3.yaml
- stack-ghc-9.10.1.yaml
exclude:
- os: macos-latest
resolver: stack-ghc-8.10.7.yaml # GHC 8.10.7 needs LLVM >= 9 & <= 12
- os: macos-latest
resolver: stack-ghc-9.0.2.yaml # GHC 9.0.2 needs LLVM >= 9 & <= 12
steps:
- name: Clone project
uses: actions/checkout@v4
- name: Cache dependencies on Unix-like OS
if: startsWith(runner.os, 'Linux') || startsWith(runner.os, 'macOS')
uses: actions/cache@v4
with:
path: ~/.stack
key: ${{ runner.os }}-${{ hashFiles( matrix.resolver ) }}
- name: Cache dependencies on Windows
if: startsWith(runner.os, 'Windows')
uses: actions/cache@v4
with:
path: |
~\AppData\Roaming\stack
~\AppData\Local\Programs\stack
key: ${{ runner.os }}-${{ hashFiles( matrix.resolver ) }}
- name: Install dependencies and test
shell: bash
run: |
set -ex
if [[ "${{ matrix.os }}" == "macos-13" || "${{ matrix.os }}" == "macos-latest" ]]
then
# macos-13 and macos-latest do not include Haskell tools as at 2024-10-19.
curl -sSL https://get.haskellstack.org/ | sh
fi
stack --resolver=${{ matrix.resolver }} test --bench --only-dependencies
stack --resolver=${{ matrix.resolver }} test --haddock --no-haddock-deps --bench --no-run-benchmarks