git.iko.soy/typeable/pandoc
on master help sign in
GitHub CI - use matrix for linux/cabal build.
3b52baaJohn MacFarlane
.github/workflows/haskell.yml+14−10
@@ -28,32 +28,36 @@ jobs:
28 linux:
28 linux:
29
29
30 runs-on: ubuntu-latest
30 runs-on: ubuntu-latest
31−
31+ strategy:
32+ matrix:
33+ ghcversion:
34+ - 8.0.2
35+ - 8.2.2
36+ - 8.4.4
37+ - 8.6.5
38+ - 8.8.1
32 steps:
39 steps:
33 - uses: actions/checkout@v1
40 - uses: actions/checkout@v1
34 - name: Install recent cabal/ghc
41 - name: Install recent cabal/ghc
35 run: |
42 run: |
36 sudo add-apt-repository ppa:hvr/ghc
43 sudo add-apt-repository ppa:hvr/ghc
37 sudo apt-get update
44 sudo apt-get update
38− sudo apt-get install ghc-8.6.4 cabal-install-2.4
45+ sudo apt-get install ghc-${{ matrix.ghcversion }} cabal-install-2.4
39 - name: Install dependencies
46 - name: Install dependencies
40 run: |
47 run: |
41 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
48 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
42 cabal v2-update
49 cabal v2-update
43 cabal v2-build --dependencies-only --enable-tests
50 cabal v2-build --dependencies-only --enable-tests
44− - name: Build
51+ - name: Build and test
45− run: |
46− export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
47− cabal v2-build --enable-tests
48− - name: Run tests
49 run: |
52 run: |
50 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
53 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
51− cabal v2-test
54+ cabal v2-install --enable-tests --run-tests 2>&1 | tee build.log
55+ # fail if warnings in local build
56+ ! grep -q "[Ww]arning:" build.log
52
57
53# ARTIFACTS: Currently disabled. The executables are large and
58# ARTIFACTS: Currently disabled. The executables are large and
54# if we do produce artifacts, we should zip them. We also
59# if we do produce artifacts, we should zip them. We also
55−# might consider doing this only nightly, compiling
60+# might consider doing this only nightly and stripping.
56−# with -split-sections and stripping the executable.
57# The code is included below in case we want to re-enable it.
61# The code is included below in case we want to re-enable it.
58#
62#
59# - name: Install artifact
63# - name: Install artifact