Skip to content

Commit

Permalink
CI: add Github action to build/test
Browse files Browse the repository at this point in the history
This more or less corresponds to the Travis
configuration we were using earlier. The main
differences are that we only use one version of
Cabal and more advanced caching of build artefacts.
  • Loading branch information
pjonsson committed Oct 12, 2021
1 parent 9932fe2 commit 7356c1f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI
on:
pull_request:
types:
- opened
- synchronize

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
cabal: ["3.4"]
ghc: ["8.8.4", "8.10.7"]
env:
CONFIG: "--enable-tests --enable-benchmarks"
steps:
- uses: actions/checkout@v2
- uses: haskell/actions/[email protected]
id: setup-haskell-cabal
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- run: cabal v2-update
- run: cabal v2-freeze $CONFIG
- uses: actions/cache@v2
with:
path: |
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
restore-keys: |
${{ runner.os }}-${{ matrix.ghc }}-
- run: cabal v2-build -j4 $CONFIG
- run: |
export feldspar_language_libdir="$PWD/src/clib"
cabal v2-test $CONFIG
# - run: cabal v2-haddock $CONFIG
- run: cabal check
- run: cabal v2-sdist

0 comments on commit 7356c1f

Please sign in to comment.