From c0ceccf716ff4b87a18c2fc56ad1f4acce37bd19 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Mon, 9 May 2016 18:04:28 +0200 Subject: [PATCH] Add travis build --- .travis.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..117ba88 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,52 @@ +# See https://github.com/hvr/multi-ghc-travis for more information + +language: c + +sudo: false + +matrix: + include: + - env: CABALVER=1.18 GHCVER=7.4.2 + addons: {apt: {packages: [cabal-install-1.18,ghc-7.4.2], sources: [hvr-ghc]}} + - env: CABALVER=1.18 GHCVER=7.6.3 + addons: {apt: {packages: [cabal-install-1.18,ghc-7.6.3], sources: [hvr-ghc]}} + - env: CABALVER=1.18 GHCVER=7.8.4 + addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} + - env: CABALVER=1.22 GHCVER=7.10.2 + addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}} + - env: CABALVER=head GHCVER=head + addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} + + allow_failures: + - env: CABALVER=head GHCVER=head + +before_install: + - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH + +install: + - cabal --version + - travis_retry cabal update + - cabal sandbox init + - cabal install --only-dependencies --enable-tests -j + +script: + - cabal configure --enable-tests -v2 + - cabal build + - cabal test + - cabal check + - cabal sdist +# check that the generated source-distribution can be built & installed + - export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; + cd dist/; + cabal sandbox init; + if [ -f "$SRC_TGZ" ]; then + cabal install "$SRC_TGZ" --enable-tests; + else + echo "expected '$SRC_TGZ' not found"; + exit 1; + fi + +notifications: + email: + - hasufell@posteo.de +