Add cabal to PATH in travis script

This commit is contained in:
Daniel Gröber 2014-05-01 03:07:10 +02:00
parent 2839d6b557
commit 7b98cb0e85

View File

@ -8,26 +8,26 @@ before_install:
- sudo add-apt-repository -y ppa:hvr/ghc - sudo add-apt-repository -y ppa:hvr/ghc
- sudo apt-get update - sudo apt-get update
- sudo apt-get install cabal-install-1.18 ghc-$GHCVER - sudo apt-get install cabal-install-1.18 ghc-$GHCVER
- export PATH=/opt/ghc/$GHCVER/bin:$PATH - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/1.18/bin:$PATH
install: install:
- cabal-1.18 update - cabal update
- cabal-1.18 install happy - cabal install happy
- export PATH=$HOME/.cabal/bin:$PATH - export PATH=$HOME/.cabal/bin:$PATH
- happy --version - happy --version
- cabal-1.18 install --only-dependencies --enable-tests - cabal install --only-dependencies --enable-tests
script: script:
- cabal-1.18 configure --enable-tests - cabal configure --enable-tests
- cabal-1.18 build - cabal build
- cabal-1.18 test - cabal test
- cabal-1.18 check - cabal check
- cabal-1.18 sdist - cabal sdist
# The following scriptlet checks that the resulting source distribution can be built & installed # The following scriptlet checks that the resulting source distribution can be built & installed
- export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}'); - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}');
cd dist/; cd dist/;
if [ -f "$SRC_TGZ" ]; then if [ -f "$SRC_TGZ" ]; then
cabal-1.18 install --enable-tests "$SRC_TGZ"; cabal install --enable-tests "$SRC_TGZ";
else else
echo "expected '$SRC_TGZ' not found"; echo "expected '$SRC_TGZ' not found";
exit 1; exit 1;