PR for running CI #2
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: Haskell CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-haskell@v1 | |
with: | |
ghc-version: '8.10.3' | |
cabal-version: '3.2' | |
- name: Cache | |
uses: actions/cache@v1 | |
env: | |
cache-name: cache-cabal | |
with: | |
path: ~/.cabal | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: | | |
cabal update | |
cabal build --only-dependencies --enable-tests --enable-benchmarks | |
- name: Build | |
# We can't really keep this constraint here, since users aren't going to | |
# know they need to specify it. But we can at least have it to check that | |
# getting the flag specified is the only blocker to a successful build. | |
run: cabal build --enable-tests --enable-benchmarks all --constraint="cryptostore +use_crypton" | |
- name: Run tests | |
run: cabal test test:testsuite |