dist: xenial language: haskell cabal: "3.2" cache: directories: - $HOME/.cabal - $HOME/.ghc - $TRAVIS_BUILD_DIR/testing/.cabal-sandbox - $HOME/.stack # Make sure to update tested-with in source/BNFC.cabal when updating these: ghc: - 7.10.3 - 8.10.2 - 8.8.4 - 8.6.5 - 8.4.4 - 8.2.2 - 8.0.2 env: - STACK=yes - CABAL=yes PACKAGEDIR="source" - CABAL=yes PACKAGEDIR="testing" matrix: allow_failure: - env: CABAL=yes PACKAGEDIR="testing" exclude: # # ghc 8.10.2 not yet supported by stack # - ghc: 8.10.2 # env: STACK=yes # # haskell-src (dependencies of testing) not yet compatible with ghc 8.10.2 # - ghc: 8.10.2 # env: CABAL=yes PACKAGEDIR="testing" # # haskell-src (dependencies of testing) throws off travis ghc 8.8 # # since travis uses cabal 2.0 when ghc 8.8 wants cabal 3.0 # - ghc: 8.8.4 # env: CABAL=yes PACKAGEDIR="testing" # HTF-0.14 does not build under 8.0 because of cabal version - ghc: 8.0.2 env: CABAL=yes PACKAGEDIR="testing" # shelly-1.9 not available for ghc 7 - ghc: 7.10.3 env: CABAL=yes PACKAGEDIR="testing" script: - if [ "$CABAL" = yes -a "$PACKAGEDIR" = source ]; then cabal v1-configure --enable-tests && cabal v1-build && cabal v1-test; fi - if [ "$CABAL" = yes -a "$PACKAGEDIR" = testing ]; then source scripts/env && ./scripts/bootstrap; fi # && ./scripts/runtests; fi - if [ "$STACK" = yes ]; then stack --no-terminal --stack-yaml stack-$GHCVER.yaml build --fast --test --no-run-tests; fi before_install: - export GHCVER=${GHCVER:-$TRAVIS_HASKELL_VERSION} - sudo apt-get update -qq - if [ "$CABAL" = yes ]; then export PATH=$HOME/.cabal/bin:$PATH && sudo apt-get install alex happy; fi - if [ "$STACK" = yes ]; then mkdir -p $HOME/.local/bin && export PATH=$HOME/.local/bin:$PATH && travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v2.3.3/stack-2.3.3-linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C $HOME/.local/bin '*/stack' && stack config set system-ghc --global true; fi - if [ "$CABAL" = yes -a "$PACKAGEDIR" = testing ]; then sudo apt-get install openjdk-9-jdk-headless jflex antlr4 ocaml texlive-latex-base hlint; fi install: - if [ "$CABAL" = yes ]; then cd $PACKAGEDIR && cabal v1-update && cabal v1-install --enable-tests --dependencies-only; fi - if [ "$STACK" = yes ]; then stack --no-terminal --stack-yaml stack-$GHCVER.yaml build --test --dependencies-only; fi # Trash # cabal user-config update && # --installdir=$HOME/.cabal/bin