@@ -4,6 +4,8 @@
5# For more information, see https://github.com/haskell-CI/haskell-ci
5# For more information, see https://github.com/haskell-CI/haskell-ci
8dist: xenial
10dist: xenial
@@ -38,25 +40,18 @@ before_cache:
40 - compiler: "ghc-8.6.3"
42 - compiler: "ghc-8.6.3"
41− # env: TEST=--disable-tests BENCH=--disable-benchmarks
42 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
43 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.3], sources: [hvr-ghc]}}
43 - compiler: "ghc-8.4.4"
44 - compiler: "ghc-8.4.4"
44− # env: TEST=--disable-tests BENCH=--disable-benchmarks
45 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
45 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
46 - compiler: "ghc-8.2.2"
46 - compiler: "ghc-8.2.2"
47− # env: TEST=--disable-tests BENCH=--disable-benchmarks
48 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
47 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
49 - compiler: "ghc-8.0.2"
48 - compiler: "ghc-8.0.2"
50− # env: TEST=--disable-tests BENCH=--disable-benchmarks
51 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
49 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
52 - compiler: "ghc-7.10.3"
50 - compiler: "ghc-7.10.3"
53− # env: TEST=--disable-tests BENCH=--disable-benchmarks
54 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
51 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
55 - compiler: "ghc-7.8.4"
52 - compiler: "ghc-7.8.4"
56− # env: TEST=--disable-tests BENCH=--disable-benchmarks
57 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
53 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
58 - compiler: "ghc-7.6.3"
54 - compiler: "ghc-7.6.3"
59− # env: TEST=--disable-tests BENCH=--disable-benchmarks
60 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
55 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
62before_install:
57before_install:
@@ -65,7 +60,7 @@ before_install:
65 - unset CC
60 - unset CC
66 - CABAL=/opt/ghc/bin/cabal
61 - CABAL=/opt/ghc/bin/cabal
67 - CABALHOME=$HOME/.cabal
62 - CABALHOME=$HOME/.cabal
68− - "export PATH=\"$CABALHOME/bin:$PATH\""
63+ - export PATH="$CABALHOME/bin:$PATH"
69 - ROOTDIR=$(pwd)
64 - ROOTDIR=$(pwd)
70 - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
65 - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
71 - echo $HCNUMVER
66 - echo $HCNUMVER
@@ -73,12 +68,11 @@ before_install:
74 - ${CABAL} --version
69 - ${CABAL} --version
75 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
70 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
71+ - TEST=--enable-tests
76− - BENCH=${BENCH---enable-benchmarks}
72+ - BENCH=--enable-benchmarks
77− - TEST=${TEST---enable-tests}
78− - UNCONSTRAINED=${UNCONSTRAINED-true}
79 - GHCHEAD=${GHCHEAD-false}
73 - GHCHEAD=${GHCHEAD-false}
80 - travis_retry ${CABAL} update -v
74 - travis_retry ${CABAL} update -v
81− - "sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config"
75+ - sed -i.bak 's/^jobs:/-- jobs:/' $CABALHOME/config
82 - rm -fv cabal.project cabal.project.local
76 - rm -fv cabal.project cabal.project.local
83 - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
77 - grep -Ev -- '^\s*--' $CABALHOME/config | grep -Ev '^\s*$'
84 - rm -f cabal.project
78 - rm -f cabal.project
@@ -122,14 +116,14 @@ script:
122 - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
116 - ${CABAL} new-build -w ${HC} ${TEST} ${BENCH} all
123 - if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
117 - if [ "x$TEST" = "x--enable-tests" ]; then ${CABAL} new-test -w ${HC} ${TEST} ${BENCH} all; fi
125− # ${CABAL} check
119+ # cabal check
126 - (cd postgresql-simple-* && ${CABAL} check)
120 - (cd postgresql-simple-* && ${CABAL} check)
128 # haddock
122 # haddock
129 - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
123 - ${CABAL} new-haddock -w ${HC} ${TEST} ${BENCH} all
131 # Build without installed constraints for packages in global-db
125 # Build without installed constraints for packages in global-db
132− - if $UNCONSTRAINED; then rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
126+ - rm -f cabal.project.local; ${CABAL} new-build -w ${HC} --disable-tests --disable-benchmarks all;
134# REGENDATA ["--config","cabal.haskell-ci","--output",".travis.yml","postgresql-simple.cabal"]
128# REGENDATA ["--config","cabal.haskell-ci","--output",".travis.yml","postgresql-simple.cabal"]