Remove unused filter function from ConflictSet.
[cabal.git] / travis-install.sh
blob427ff77dacaef277a1cb594b2492a6cd6108ee49
1 #!/bin/sh
2 set -ex
4 . ./travis-common.sh
6 if [ "$GHCVER" = "none" ]; then
7 travis_retry sudo add-apt-repository -y ppa:hvr/ghc
8 travis_retry sudo apt-get update
9 travis_retry sudo apt-get install --force-yes ghc-$GHCVER
12 if [ -z ${STACK_CONFIG+x} ]; then
13 if [ "$TRAVIS_OS_NAME" = "linux" ]; then
14 travis_retry sudo add-apt-repository -y ppa:hvr/ghc
15 travis_retry sudo apt-get update
16 travis_retry sudo apt-get install --force-yes cabal-install-3.0 ghc-$GHCVER-prof ghc-$GHCVER-dyn
17 if [ "x$TEST_OTHER_VERSIONS" = "xYES" ]; then travis_retry sudo apt-get install --force-yes ghc-7.0.4-prof ghc-7.0.4-dyn ghc-7.2.2-prof ghc-7.2.2-dyn ghc-head-prof ghc-head-dyn; fi
19 if [ "$SCRIPT" = "meta" ]; then
20 # change to /tmp so cabal.project doesn't affect new-install
21 cabal v2-update
22 (cd /tmp && cabal v2-install alex --constraint='alex ^>= 3.2.5' --overwrite=always)
23 (cd /tmp && cabal v2-install happy --constraint='happy ^>= 1.19.9' --overwrite=always)
26 elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
28 case $GHCVER in
29 8.0.2)
30 GHCURL=http://downloads.haskell.org/~ghc/8.0.2/ghc-8.0.2-x86_64-apple-darwin.tar.xz;
31 GHCXZ=YES
33 8.0.1)
34 GHCURL=http://downloads.haskell.org/~ghc/8.0.1/ghc-8.0.1-x86_64-apple-darwin.tar.xz;
35 GHCXZ=YES
37 7.10.3)
38 GHCURL=http://downloads.haskell.org/~ghc/7.10.3/ghc-7.10.3b-x86_64-apple-darwin.tar.xz
39 GHCXZ=YES
41 7.8.4)
42 GHCURL=https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-apple-darwin.tar.xz
43 GHCXZ=YES
45 7.6.3)
46 GHCURL=https://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-x86_64-apple-darwin.tar.bz2
48 7.4.2)
49 GHCURL=https://www.haskell.org/ghc/dist/7.4.2/ghc-7.4.2-x86_64-apple-darwin.tar.bz2
52 echo "Unknown GHC: $GHCVER"
53 false
55 esac
57 travis_retry curl -OL $GHCURL
58 if [ "$GHCXZ" = "YES" ]; then
59 tar -xJf ghc-*.tar.*;
60 else
61 tar -xjf ghc-*.tar.*;
64 cd ghc-*;
65 ./configure --prefix=$HOME/.ghc-install/$GHCVER
66 make install;
67 cd ..;
69 mkdir "${HOME}/bin"
70 travis_retry curl -L https://downloads.haskell.org/~cabal/cabal-install-3.0.0.0/cabal-install-3.0.0.0-x86_64-apple-darwin17.7.0.tar.xz | tar xzO > "${HOME}/bin/cabal"
71 chmod a+x "${HOME}/bin/cabal"
72 "${HOME}/bin/cabal" --version
74 else
75 echo "Not linux or osx: $TRAVIS_OS_NAME"
76 false
79 else # Stack-based builds
80 mkdir -p ~/.local/bin
81 travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 \
82 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
83 ~/.local/bin/stack --version
84 ~/.local/bin/stack setup --stack-yaml "$STACK_CONFIG"
88 git version