diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 0000000..d11900f --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,50 @@ +name: Haskell CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + ghc: ['8.6.5', '8.8.3'] + cabal: ['2.4.1.0', '3.0.0.0'] + os: [ubuntu-latest, macOS-latest] #, windows-latest] + exclude: + # GHC 8.8+ only works with cabal v3+ + - ghc: 8.8.3 + cabal: 2.4.1.0 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1.1 + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: ${{ matrix.cabal }} + + - 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 v2-update + cabal v2-build --only-dependencies --enable-tests --enable-benchmarks + - name: Build + run: cabal v2-build --enable-tests --enable-benchmarks all + - name: Run tests + run: cabal v2-test all diff --git a/.travis.yml b/.travis.yml index f7f552d..02e87f7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ matrix: # Cabal - ghc: 8.4.4 - ghc: 8.6.5 - - ghc: 8.8.2 + - ghc: 8.8.3 # Stack - ghc: 8.6.5 diff --git a/stack.yaml.lock b/stack.yaml.lock new file mode 100644 index 0000000..bac3bc0 --- /dev/null +++ b/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + size: 524127 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/14/6.yaml + sha256: dc70dfb45e2c32f54719819bd055f46855dd4b3bd2e58b9f3f38729a2d553fbb + original: lts-14.6