2015-03-18 14:54:12 +00:00
|
|
|
# See https://github.com/hvr/multi-ghc-travis for more information.
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
env:
|
|
|
|
# We use CABALVER=1.22 everywhere because it uses the flag --enable-coverage
|
|
|
|
# instead of --enable-library-coverage used by older versions.
|
2016-05-21 07:14:26 +00:00
|
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=2.6.12
|
2017-04-08 19:54:06 +00:00
|
|
|
- GHCVER=7.10.3 CABALVER=1.22 MONGO=2.6.12
|
2017-04-09 18:58:07 +00:00
|
|
|
- GHCVER=8.0.2 CABALVER=1.24 MONGO=2.6.12
|
2016-05-20 19:45:18 +00:00
|
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=3.0.12
|
2017-04-08 19:54:06 +00:00
|
|
|
- GHCVER=7.10.3 CABALVER=1.22 MONGO=3.0.12
|
2017-04-09 18:58:07 +00:00
|
|
|
- GHCVER=8.0.2 CABALVER=1.24 MONGO=3.0.12
|
2016-05-20 19:45:18 +00:00
|
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=3.2.6
|
2017-04-08 19:54:06 +00:00
|
|
|
- GHCVER=7.10.3 CABALVER=1.22 MONGO=3.2.6
|
2017-04-09 18:58:07 +00:00
|
|
|
- GHCVER=8.0.2 CABALVER=1.24 MONGO=3.2.6
|
2017-04-08 19:57:23 +00:00
|
|
|
- GHCVER=7.8.4 CABALVER=1.22 MONGO=3.4.3
|
|
|
|
- GHCVER=7.10.3 CABALVER=1.22 MONGO=3.4.3
|
2017-04-09 18:58:07 +00:00
|
|
|
- GHCVER=8.0.2 CABALVER=1.24 MONGO=3.4.3
|
2015-03-18 14:54:12 +00:00
|
|
|
|
2014-08-18 07:27:17 +00:00
|
|
|
before_install:
|
2016-05-20 19:45:18 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
- 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
|
2016-05-20 19:45:18 +00:00
|
|
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
|
|
|
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
|
2017-04-09 18:58:07 +00:00
|
|
|
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
|
|
|
|
- echo "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
|
2016-05-20 19:45:18 +00:00
|
|
|
- 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
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
install:
|
|
|
|
- travis_retry cabal update
|
2015-03-22 16:05:04 +00:00
|
|
|
# Install the combined dependencies for this package and all other packages
|
|
|
|
# needed to reduce conflicts.
|
2015-09-04 18:38:15 +00:00
|
|
|
- cabal sandbox init
|
2016-04-24 22:29:12 +00:00
|
|
|
- cabal install --only-dependencies --enable-tests
|
2014-08-18 07:27:17 +00:00
|
|
|
|
2015-03-18 14:54:12 +00:00
|
|
|
script:
|
2016-04-24 22:29:12 +00:00
|
|
|
- cabal configure --enable-tests -v2
|
2015-03-18 14:54:12 +00:00
|
|
|
- cabal build
|
|
|
|
# cabal test fails due a to hpc error. Using run-cabal-test instead.
|
|
|
|
# - cabal test --show-details=always
|
2016-04-24 22:29:12 +00:00
|
|
|
- cabal test --show-details=always
|
2015-03-18 14:54:12 +00:00
|
|
|
# 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
|
2015-12-22 16:32:19 +00:00
|
|
|
cabal install --force-reinstalls "$SRC_TGZ";
|
2015-03-18 14:54:12 +00:00
|
|
|
else
|
|
|
|
echo "expected '$SRC_TGZ' not found";
|
|
|
|
exit 1;
|
|
|
|
fi
|
2017-05-13 22:17:43 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: deploy
|
|
|
|
env: GHCVER=8.0.2 CABALVER=1.24 MONGO=3.4.3
|
|
|
|
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
|
|
|
|
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
|
|
|
- cabal --version
|
|
|
|
install: skip
|
|
|
|
script: skip
|
|
|
|
deploy:
|
|
|
|
provider: hackage
|
|
|
|
username: VictorDenisov
|
|
|
|
password:
|
|
|
|
secure: DPYlqRN09gFp06paLj9bRBzpxTkqkZzfsTrU3j0WiqRzqUMeWEeiZNAkIE/maC9xrEuuYBTk0KlSdz+esF4kjfyRQFTxb9CvXrZ474qHozVLC01vh/av5bGZBDQOwgzJrJNVpfl+g+EADOicz9/nhPXiAd7nCQIv/2s/xM1Yj1U=
|
|
|
|
on:
|
|
|
|
repo: mongodb-haskell/mongodb
|
|
|
|
tags: true
|
|
|
|
|