Skip to content

Introduce CLI (#14) #106

Introduce CLI (#14)

Introduce CLI (#14) #106

Workflow file for this run

name: password
# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
push:
branches: [master]
jobs:
cabal:
name: cabal / ghc-${{matrix.ghc}} / ${{ matrix.os }}
continue-on-error: ${{ matrix.ghc == '9.4.4'}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
cabal: ["latest"]
ghc:
- "8.6.5"
- "8.8.4"
- "8.10.7"
- "9.0.2"
- "9.2.5"
- "9.4.4"
steps:
- uses: actions/checkout@v2
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v3
name: Cache cabal-store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal
- name: Build
run: |
cabal update
cabal build all --enable-tests --enable-benchmarks --write-ghc-environment-files=always
- name: Test
run: |
cabal test all --enable-tests
stack:
name: stack ${{ matrix.resolver }}
runs-on: ubuntu-latest
# This makes the CI jobs not all be cancelled if nightly fails to build.
# However, if nightly fails to build, CI still gets a red X in the GitHub UI.
# Ideally we want CI as a whole to pass even if nightly fails. There doesn't
# appear to be a way to work around this for now.
#
# When some sort of `allow-failure` functionality is available in GitHub
# actions, we should switch to it:
# https://github.com/actions/toolkit/issues/399
continue-on-error: ${{ matrix.resolver == '--resolver nightly' }}
strategy:
matrix:
stack: ["latest"]
resolver:
- "--resolver lts-14 --stack-yaml ./stack-lts-14.yaml" # GHC 8.6.5
- "--resolver lts-16" # GHC 8.8.4
- "--resolver lts-18" # GHC 8.10.7
- "--resolver lts-19" # GHC 9.0.2
- "--resolver lts-20" # GHC 9.2.5
- "--resolver nightly" # GHC 9.4.4
steps:
- uses: actions/checkout@v2
#if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: haskell/actions/setup@v2
name: Setup Haskell Stack
with:
stack-version: ${{ matrix.stack }}
enable-stack: true
- uses: actions/cache@v3
name: Cache ~/.stack
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.resolver }}-stack
- name: Build
run: |
stack build ${{ matrix.resolver }} --test --bench --no-run-tests --no-run-benchmarks
- name: Test
run: |
stack test ${{ matrix.resolver }}