Skip to content
Snippets Groups Projects
Commit f3ade3fe authored by Edward Z. Yang's avatar Edward Z. Yang
Browse files

Switch Travis builds to use cabal-install 2.0

- cabal-install 2.0 new-build has different directory
  layout; everything is adjusted for that.
- Using hvr's PPA for Linux builds, and a custom
  ezyang build for OS X
parent 4942b1f5
No related branches found
No related tags found
No related merge requests found
......@@ -105,7 +105,7 @@ before_install:
- export PATH=$HOME/bin:$PATH
- export PATH=$HOME/.cabal/bin:$PATH
- export PATH=$HOME/.local/bin:$PATH
- export PATH=/opt/cabal/1.24/bin:$PATH
- export PATH=/opt/cabal/2.0/bin:$PATH
- export PATH=/opt/happy/1.19.5/bin:$PATH
- export PATH=/opt/alex/3.1.7/bin:$PATH
- if [ "$USE_GOLD" = "YES" ]; then sudo update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20; fi
......
......@@ -3,13 +3,19 @@ set -e
HACKAGE_REPO_TOOL_VERSION="0.1.1"
CABAL_VERSION="2.1.0.0"
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
ARCH="x86_64-linux"
else
ARCH="x86_64-osx"
fi
CABAL_STORE_DB="${HOME}/.cabal/store/ghc-${GHCVER}/package.db"
CABAL_LOCAL_DB="${TRAVIS_BUILD_DIR}/dist-newstyle/packagedb/ghc-${GHCVER}"
CABAL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/Cabal-${CABAL_VERSION}"
CABAL_TESTSUITE_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/cabal-testsuite-${CABAL_VERSION}"
CABAL_INSTALL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/cabal-install-${CABAL_VERSION}"
CABAL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/$ARCH/ghc-$GHCVER/Cabal-${CABAL_VERSION}"
CABAL_TESTSUITE_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/$ARCH/ghc-$GHCVER/cabal-testsuite-${CABAL_VERSION}"
CABAL_INSTALL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/$ARCH/ghc-$GHCVER/cabal-install-${CABAL_VERSION}"
CABAL_INSTALL_SETUP="${CABAL_INSTALL_BDIR}/setup/setup"
HACKAGE_REPO_TOOL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/hackage-repo-tool-${HACKAGE_REPO_TOOL_VERSION}"
HACKAGE_REPO_TOOL_BDIR="${TRAVIS_BUILD_DIR}/dist-newstyle/build/$ARCH/ghc-$GHCVER/hackage-repo-tool-${HACKAGE_REPO_TOOL_VERSION}/c/hackage-repo-tool"
# ---------------------------------------------------------------------
# Timing / diagnostic output
......
......@@ -13,7 +13,7 @@ if [ -z ${STACKAGE_RESOLVER+x} ]; then
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
travis_retry sudo add-apt-repository -y ppa:hvr/ghc
travis_retry sudo apt-get update
travis_retry sudo apt-get install --force-yes cabal-install-1.24 happy-1.19.5 alex-3.1.7 ghc-$GHCVER-prof ghc-$GHCVER-dyn
travis_retry sudo apt-get install --force-yes cabal-install-2.0 happy-1.19.5 alex-3.1.7 ghc-$GHCVER-prof ghc-$GHCVER-dyn
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
elif [ "$TRAVIS_OS_NAME" = "osx" ]; then
......@@ -59,10 +59,9 @@ if [ -z ${STACKAGE_RESOLVER+x} ]; then
make install;
cd ..;
travis_retry curl -L https://www.haskell.org/cabal/release/cabal-install-1.24.0.2/cabal-install-1.24.0.2-x86_64-apple-darwin-yosemite.tar.gz -o cabal-install.tar.gz
TAR=$PWD/cabal-install.tar.gz
mkdir "${HOME}/bin"
(cd "${HOME}/bin" && tar -xzf "$TAR")
travis_retry curl -L http://web.mit.edu/~ezyang/Public/cabal-install-2.0.0.0-osx.gz | gunzip -c > "${HOME}/bin/cabal"
chmod a+x "${HOME}/bin/cabal"
"${HOME}/bin/cabal" --version
else
......
......@@ -70,10 +70,10 @@ cp $TRAVIS_BUILD_DIR/travis/id_rsa .
cp $TRAVIS_BUILD_DIR/travis-install.sh .
cp $TRAVIS_BUILD_DIR/travis-common.sh .
# The binaries to test (statically linked, of course!)
cp ${CABAL_BDIR}/build/unit-tests/unit-tests Cabal
cp ${CABAL_BDIR}/c/unit-tests/build/unit-tests/unit-tests Cabal
if [ "x$PARSEC" = "xYES" ]; then
cp ${CABAL_BDIR}/build/parser-tests/parser-tests Cabal
cp ${CABAL_BDIR}/build/parser-hackage-tests/parser-hackage-tests Cabal
cp ${CABAL_BDIR}/c/parser-tests/build/parser-tests/parser-tests Cabal
cp ${CABAL_BDIR}/c/parser-hackage-tests/build/parser-hackage-tests/parser-hackage-tests Cabal
fi
if [ "x$CABAL_LIB_ONLY" != "xYES" ]; then
cp ${CABAL_INSTALL_BDIR}/build/cabal/cabal cabal-install
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment