78 lines
3.3 KiB
YAML
78 lines
3.3 KiB
YAML
# See https://github.com/hvr/multi-ghc-travis for more information.
|
|
|
|
env:
|
|
# We use CABALVER=1.22 everywhere because it uses the flag --enable-coverage
|
|
# instead of --enable-library-coverage used by older versions.
|
|
- GHCVER=7.6.3 CABALVER=1.22 MONGO=2.4.14
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=2.4.14
|
|
- GHCVER=7.10.1 CABALVER=1.22 MONGO=2.4.14
|
|
- GHCVER=7.6.3 CABALVER=1.22 MONGO=2.6.12
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=2.6.12
|
|
- GHCVER=7.10.1 CABALVER=1.22 MONGO=2.6.12
|
|
- GHCVER=7.6.3 CABALVER=1.22 MONGO=3.0.12
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=3.0.12
|
|
- GHCVER=7.10.1 CABALVER=1.22 MONGO=3.0.12
|
|
- GHCVER=7.6.3 CABALVER=1.22 MONGO=3.2.6
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=3.2.6
|
|
- GHCVER=7.10.1 CABALVER=1.22 MONGO=3.2.6
|
|
- GHCVER=head CABALVER=head MONGO=3.2.6
|
|
|
|
matrix:
|
|
allow_failures:
|
|
# The text here should match the last line above exactly.
|
|
- env: GHCVER=head CABALVER=head MONGO=3.2.6
|
|
|
|
before_install:
|
|
|
|
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
|
|
- travis_retry sudo apt-get update
|
|
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER
|
|
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
|
- cabal --version
|
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
|
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
|
- echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
|
|
- echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
|
|
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
|
|
- sudo apt-get update
|
|
- if [[ ${MONGO:0:3} == "2.4" ]]; then sudo apt-get install mongodb-10gen=$MONGO; else sudo apt-get install -y mongodb-org=$MONGO mongodb-org-server=$MONGO mongodb-org-shell=$MONGO mongodb-org-tools=$MONGO; fi
|
|
- ls /etc/init.d
|
|
- if [[ ${MONGO:0:3} == "2.4" ]]; then sudo service mongodb start; fi
|
|
- sleep 15 #mongo may not be responded directly. See http://docs.travis-ci.com/user/database-setup/#MongoDB
|
|
- ps axf | grep mongo
|
|
- netstat -apn
|
|
- mongo --version
|
|
|
|
install:
|
|
- travis_retry cabal update
|
|
# Install the combined dependencies for this package and all other packages
|
|
# needed to reduce conflicts.
|
|
- cabal sandbox init
|
|
- cabal install --only-dependencies --enable-tests
|
|
|
|
script:
|
|
- cabal configure --enable-tests -v2
|
|
- cabal build
|
|
# cabal test fails due a to hpc error. Using run-cabal-test instead.
|
|
# - cabal test --show-details=always
|
|
- cabal test --show-details=always
|
|
# Ignoring the exit code here. Need to register with coveralls.io?
|
|
# Ignoring the exit code here. cabal check recommends against
|
|
# 'ghc-prof-options: -auto-all'.
|
|
- cabal check || true
|
|
- cabal sdist
|
|
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}');
|
|
cd dist/;
|
|
if [ -f "$SRC_TGZ" ]; then
|
|
cabal install --force-reinstalls "$SRC_TGZ";
|
|
else
|
|
echo "expected '$SRC_TGZ' not found";
|
|
exit 1;
|
|
fi
|
|
- git clone https://github.com/yesodweb/persistent
|
|
- cd persistent
|
|
- "cabal install ./persistent ./persistent-mongoDB --only-dependencies"
|
|
- cd persistent-test
|
|
- cabal install -fmongodb --enable-tests
|
|
- "cabal configure -fmongodb --enable-tests && cabal test"
|