summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml42
1 files changed, 42 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..905f39d
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,42 @@
+name: build
+on: [push, pull_request]
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ghc: ['8.6', '8.8', '8.10']
+ cabal: ['3.0', '3.2']
+ steps:
+ - uses: actions/checkout@v2
+ - uses: actions/setup-haskell@v1
+ 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 update
+ cabal build --only-dependencies --enable-tests --enable-benchmarks
+ - name: Build
+ run: cabal build --enable-tests --enable-benchmarks all
+ - name: Run tests
+ run: cabal test all
+ - name: Build documentation
+ run: cabal run pesto-doc
+ - uses: actions/upload-artifact@v2
+ with:
+ name: documentation
+ path: _build/
+