@@ -28,32 +28,36 @@ jobs:
30 runs-on: ubuntu-latest
30 runs-on: ubuntu-latest
33 - uses: actions/checkout@v1
40 - uses: actions/checkout@v1
34 - name: Install recent cabal/ghc
41 - name: Install recent cabal/ghc
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
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
46− export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
47− cabal v2-build --enable-tests
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
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.
59# - name: Install artifact
63# - name: Install artifact