Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sergv committed May 19, 2023
1 parent 7e78b37 commit 246d058
Showing 1 changed file with 75 additions and 0 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/haskell-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build
on:
- push
- pull_request

defaults:
run:
shell: bash

jobs:
main:
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc:
- "9.2.7"
- "9.4.5"
- "9.6.1"
include:
- os: macOS-latest
ghc: "9.6.1"
- os: windows-latest
ghc: "9.6.1"
steps:
- uses: actions/checkout@v3
- uses: haskell/actions/setup@v2.3.7
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
cabal-update: true
- uses: actions/cache@v3
name: Cache cabal stuff
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}

- name: Cabal version
run: |
cabal --version
- name: Install doctest
run: |
mkdir -p "${{github.workspace}}/doctest-bin"
cabal install --install-method=symlink --installdir "${{github.workspace}}/doctest-bin" doctest
- name: Unpack
run: |
cabal sdist --ignore-project --output-directory .
cabal get prettyprinter-combinators-*.tar.gz
- name: Build
run: |
cd prettyprinter-combinators-*/
cabal build all --enable-tests --enable-benchmarks
- name: Doctest
run: |
cd prettyprinter-combinators-*/
cabal repl --with-ghc "${{github.workspace}}/doctest-bin/doctest" --repl-options=-Wno-missing-export-lists 'lib:prettyprinter-combinators'
- name: Haddock
run: |
cd prettyprinter-combinators-*/
cabal haddock all
- name: Cabal check
run: |
cd prettyprinter-combinators-*/
cabal check

0 comments on commit 246d058

Please sign in to comment.