mirror of
https://github.com/stackbuilders/hapistrano.git
synced 2024-12-25 12:33:16 +03:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
# The present workflow was made based on the following references:
|
|
# - https://github.com/actions/cache/blob/main/examples.md#haskell---cabal
|
|
# - https://github.com/haskell/time/blob/master/.github/workflows/ci.yml
|
|
# - https://github.com/stackbuilders/stache/blob/master/.github/workflows/ci.yaml
|
|
# - https://markkarpov.com/post/github-actions-for-haskell-ci.html
|
|
---
|
|
name: CI
|
|
|
|
on: push
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
ghc:
|
|
- "9.0"
|
|
- "8.10"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- if: ${{ runner.os == 'Linux' }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install zsh
|
|
- if: ${{ runner.os == 'macOS' }}
|
|
run: |
|
|
brew update
|
|
brew install zsh
|
|
- uses: haskell/actions/setup@v2
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: "3.6"
|
|
id: setup-haskell
|
|
- run: cabal configure --enable-tests
|
|
- run: cabal freeze
|
|
- uses: actions/cache@v3
|
|
with:
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
|
|
path: |
|
|
${{ steps.setup-haskell.outputs.cabal-store }}
|
|
dist-newstyle
|
|
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
|
|
- run: cabal build
|
|
- run: cabal test
|
|
- run: ./script/haddock
|