build #1200
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 | |
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: | |
- '8.8' | |
- '8.10' | |
- '9.0' | |
- '9.2' | |
- '9.4' | |
- '9.6' | |
include: | |
- os: macos-latest | |
ghc: system | |
- os: windows-latest | |
ghc: '9.2' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: hspec/setup-haskell@v1 | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
id: setup-haskell | |
- run: cabal update | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ runner.os == 'Windows' && 'C:/cabal/store/' || runner.os == 'macOS' && '~/.cabal/store/' || '~/.local/state/cabal/store/' }} | |
key: ${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}-${{ github.run_id }} | |
restore-keys: ${{ runner.os }}-${{ steps.setup-haskell.outputs.ghc-version }}- | |
- uses: sol/run-haskell-tests@v1 | |
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: false | |
if: needs.build.result != 'success' | |
- uses: actions/checkout@v3 | |
- name: Check for trailing whitespace | |
run: '! git grep -I "\s\+$"' |