git.iko.soy/typeable/pandoc
on master help sign in
circleci: explicitly specify ghc version to use.
af7486cJohn MacFarlane
.circleci/config.yml+7−5
@@ -40,28 +40,30 @@ commands:
40 - checkout
40 - checkout
41 - *preinstall
41 - *preinstall
42 - *restore
42 - *restore
43+ - run:
44+ name: install cabal
45+ command: apt-get install -y cabal-install-2.4
43 - run:
46 - run:
44 name: install ghc
47 name: install ghc
45 command: apt-get install -y ghc-<< parameters.ghcversion >>
48 command: apt-get install -y ghc-<< parameters.ghcversion >>
46 - run: |
49 - run: |
47 set -e
50 set -e
48− apt-get install -y cabal-install-2.4
49 cabal v2-update
51 cabal v2-update
50 TMPDIR=`mktemp -d -t circleci.XXXXXXX`
52 TMPDIR=`mktemp -d -t circleci.XXXXXXX`
51 cabal v2-sdist --output-dir=${TMPDIR}
53 cabal v2-sdist --output-dir=${TMPDIR}
52 cd ${TMPDIR}
54 cd ${TMPDIR}
53 tar xvzf *.tar.gz
55 tar xvzf *.tar.gz
54 cd *
56 cd *
55− cabal v2-build -j2 --dependencies-only --enable-tests --ghc-options="${GHC_OPTS}" all
57+ cabal v2-build -w ghc-<< parameters.ghcversion >> -j2 --dependencies-only --enable-tests --ghc-options="${GHC_OPTS}" all
56− cabal v2-build -j2 --enable-tests --ghc-options="${GHC_OPTS}" all 2>build.log
58+ cabal v2-build -w ghc-<< parameters.ghcversion>> -j2 --enable-tests --ghc-options="${GHC_OPTS}" all 2>build.log
57 cat build.log
59 cat build.log
58 # fail if we had warnings in local build
60 # fail if we had warnings in local build
59 # this is to work around the fact that cabal v2 doesn't allow
61 # this is to work around the fact that cabal v2 doesn't allow
60 # us to use -Werror for just local build:
62 # us to use -Werror for just local build:
61 # https://github.com/haskell/cabal/issues/4247
63 # https://github.com/haskell/cabal/issues/4247
62 ! grep -q "warning:" build.log
64 ! grep -q "warning:" build.log
63− cabal v2-test --ghc-options="${GHC_OPTS}" 2>build.log
65+ cabal v2-test -w ghc-<< parameters.ghcversion >> --ghc-options="${GHC_OPTS}" 2>build.log
64− cabal v2-haddock --ghc-options="${GHC_OPTS}"
66+ cabal v2-haddock -w ghc-<< parameters.ghcversion >> --ghc-options="${GHC_OPTS}"
65 cabal check
67 cabal check
66 - *save
68 - *save
67
69