2017-10-22 11:59:10 +02:00
|
|
|
# This Travis job script has been generated by a script via
|
|
|
|
#
|
2019-02-11 14:52:42 +01:00
|
|
|
# haskell-ci '--config=cabal.haskell-ci' '--output=.travis.yml' 'cabal.project'
|
2017-10-22 11:59:10 +02:00
|
|
|
#
|
2018-09-19 12:27:43 +02:00
|
|
|
# For more information, see https://github.com/haskell-CI/haskell-ci
|
2017-10-22 11:59:10 +02:00
|
|
|
#
|
2019-12-09 13:31:10 +01:00
|
|
|
# version: 0.9.20191209
|
2019-03-06 11:39:18 +01:00
|
|
|
#
|
2019-12-09 13:31:10 +01:00
|
|
|
version: ~> 1.0
|
2017-10-22 11:59:10 +02:00
|
|
|
language: c
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2019-11-17 18:39:44 +01:00
|
|
|
dist: bionic
|
2017-10-22 11:59:10 +02:00
|
|
|
git:
|
2019-03-22 00:27:28 +01:00
|
|
|
# whether to recursively clone submodules
|
|
|
|
submodules: false
|
2017-11-10 22:29:48 +01:00
|
|
|
branches:
|
|
|
|
only:
|
2017-12-10 12:29:37 +01:00
|
|
|
- master
|
2018-07-28 14:40:25 +02:00
|
|
|
addons:
|
|
|
|
google: stable
|
2017-10-22 11:59:10 +02:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.cabal/packages
|
|
|
|
- $HOME/.cabal/store
|
2019-11-11 09:11:34 +01:00
|
|
|
- $HOME/.hlint
|
2017-10-22 11:59:10 +02:00
|
|
|
before_cache:
|
2019-02-25 21:37:04 +01:00
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/build-reports.log
|
2017-10-22 11:59:10 +02:00
|
|
|
# remove files that are regenerated by 'cabal update'
|
2019-02-25 21:37:04 +01:00
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/00-index.*
|
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/*.json
|
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.cache
|
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar
|
|
|
|
- rm -fv $CABALHOME/packages/hackage.haskell.org/01-index.tar.idx
|
|
|
|
- rm -rfv $CABALHOME/packages/head.hackage
|
2019-12-09 13:31:10 +01:00
|
|
|
jobs:
|
2017-10-22 11:59:10 +02:00
|
|
|
include:
|
2019-09-07 10:46:11 +02:00
|
|
|
- compiler: ghcjs-8.4
|
2019-12-09 13:31:10 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"},{"sourceline":"deb http://ppa.launchpad.net/hvr/ghcjs/ubuntu bionic main"},{"sourceline":"deb https://deb.nodesource.com/node_10.x bionic main","key_url":"https://deb.nodesource.com/gpgkey/nodesource.gpg.key"}],"packages":["ghcjs-8.4","cabal-install-3.0","ghc-8.4.4","nodejs"]}}
|
|
|
|
os: linux
|
2019-09-11 09:34:29 +02:00
|
|
|
- compiler: ghc-8.8.1
|
2019-11-17 18:39:44 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.8.1","cabal-install-3.0"]}}
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2019-09-07 10:46:11 +02:00
|
|
|
- compiler: ghc-8.6.5
|
2019-11-17 18:39:44 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.6.5","cabal-install-3.0"]}}
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2019-03-22 00:27:28 +01:00
|
|
|
- compiler: ghc-8.4.4
|
2019-11-17 18:39:44 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.4.4","cabal-install-3.0"]}}
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2019-03-22 00:27:28 +01:00
|
|
|
- compiler: ghc-8.2.2
|
2019-11-17 18:39:44 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.2.2","cabal-install-3.0"]}}
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2019-03-22 00:27:28 +01:00
|
|
|
- compiler: ghc-8.0.2
|
2019-11-17 18:39:44 +01:00
|
|
|
addons: {"apt":{"sources":[{"sourceline":"deb http://ppa.launchpad.net/hvr/ghc/ubuntu bionic main","key_url":"https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x063dab2bdc0b3f9fcebc378bff3aeacef6f88286"}],"packages":["ghc-8.0.2","cabal-install-3.0"]}}
|
2019-12-09 13:31:10 +01:00
|
|
|
os: linux
|
2017-10-22 11:59:10 +02:00
|
|
|
before_install:
|
2019-09-07 10:46:11 +02:00
|
|
|
- |
|
|
|
|
if echo $CC | grep -q ghcjs; then
|
|
|
|
GHCJS=true;
|
|
|
|
else
|
|
|
|
GHCJS=false;
|
|
|
|
fi
|
2019-03-22 00:27:28 +01:00
|
|
|
- HC=$(echo "/opt/$CC/bin/ghc" | sed 's/-/\//')
|
2019-09-07 10:46:11 +02:00
|
|
|
- WITHCOMPILER="-w $HC"
|
|
|
|
- if $GHCJS ; then HC=${HC}js ; fi
|
|
|
|
- if $GHCJS ; then WITHCOMPILER="--ghcjs ${WITHCOMPILER}js" ; fi
|
|
|
|
- HADDOCK=$(echo "/opt/$CC/bin/haddock" | sed 's/-/\//')
|
|
|
|
- if $GHCJS ; then PATH="/opt/ghc/8.4.4/bin:$PATH" ; fi
|
2019-03-22 00:27:28 +01:00
|
|
|
- HCPKG="$HC-pkg"
|
2017-10-22 11:59:10 +02:00
|
|
|
- unset CC
|
2019-02-25 21:37:04 +01:00
|
|
|
- CABAL=/opt/ghc/bin/cabal
|
|
|
|
- CABALHOME=$HOME/.cabal
|
2019-02-28 09:53:24 +01:00
|
|
|
- export PATH="$CABALHOME/bin:$PATH"
|
2019-03-22 00:27:28 +01:00
|
|
|
- TOP=$(pwd)
|
2019-09-07 10:46:11 +02:00
|
|
|
- "HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\\d+)\\.(\\d+)\\.(\\d+)(\\.(\\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')"
|
2018-01-05 09:33:10 +01:00
|
|
|
- echo $HCNUMVER
|
2019-03-22 00:27:28 +01:00
|
|
|
- CABAL="$CABAL -vnormal+nowrap+markoutput"
|
|
|
|
- set -o pipefail
|
|
|
|
- |
|
|
|
|
echo 'function blue(s) { printf "\033[0;34m" s "\033[0m " }' >> .colorful.awk
|
|
|
|
echo 'BEGIN { state = "output"; }' >> .colorful.awk
|
|
|
|
echo '/^-----BEGIN CABAL OUTPUT-----$/ { state = "cabal" }' >> .colorful.awk
|
|
|
|
echo '/^-----END CABAL OUTPUT-----$/ { state = "output" }' >> .colorful.awk
|
|
|
|
echo '!/^(-----BEGIN CABAL OUTPUT-----|-----END CABAL OUTPUT-----)/ {' >> .colorful.awk
|
|
|
|
echo ' if (state == "cabal") {' >> .colorful.awk
|
|
|
|
echo ' print blue($0)' >> .colorful.awk
|
|
|
|
echo ' } else {' >> .colorful.awk
|
|
|
|
echo ' print $0' >> .colorful.awk
|
|
|
|
echo ' }' >> .colorful.awk
|
|
|
|
echo '}' >> .colorful.awk
|
|
|
|
- cat .colorful.awk
|
|
|
|
- |
|
|
|
|
color_cabal_output () {
|
|
|
|
awk -f $TOP/.colorful.awk
|
|
|
|
}
|
|
|
|
- echo text | color_cabal_output
|
2015-04-20 13:38:25 +02:00
|
|
|
install:
|
2019-02-25 21:37:04 +01:00
|
|
|
- ${CABAL} --version
|
2017-10-22 11:59:10 +02:00
|
|
|
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
2019-09-07 10:46:11 +02:00
|
|
|
- node --version
|
|
|
|
- echo $GHCJS
|
2019-02-25 21:37:04 +01:00
|
|
|
- TEST=--enable-tests
|
|
|
|
- BENCH=--enable-benchmarks
|
2019-09-07 10:46:11 +02:00
|
|
|
- HEADHACKAGE=false
|
2019-03-22 00:27:28 +01:00
|
|
|
- rm -f $CABALHOME/config
|
|
|
|
- |
|
2019-11-11 09:11:34 +01:00
|
|
|
echo "verbose: normal +nowrap +markoutput" >> $CABALHOME/config
|
|
|
|
echo "remote-build-reporting: anonymous" >> $CABALHOME/config
|
|
|
|
echo "write-ghc-environment-files: always" >> $CABALHOME/config
|
|
|
|
echo "remote-repo-cache: $CABALHOME/packages" >> $CABALHOME/config
|
|
|
|
echo "logs-dir: $CABALHOME/logs" >> $CABALHOME/config
|
|
|
|
echo "world-file: $CABALHOME/world" >> $CABALHOME/config
|
|
|
|
echo "extra-prog-path: $CABALHOME/bin" >> $CABALHOME/config
|
|
|
|
echo "symlink-bindir: $CABALHOME/bin" >> $CABALHOME/config
|
|
|
|
echo "installdir: $CABALHOME/bin" >> $CABALHOME/config
|
|
|
|
echo "build-summary: $CABALHOME/logs/build.log" >> $CABALHOME/config
|
|
|
|
echo "store-dir: $CABALHOME/store" >> $CABALHOME/config
|
|
|
|
echo "install-dirs user" >> $CABALHOME/config
|
|
|
|
echo " prefix: $CABALHOME" >> $CABALHOME/config
|
|
|
|
echo "repository hackage.haskell.org" >> $CABALHOME/config
|
|
|
|
echo " url: http://hackage.haskell.org/" >> $CABALHOME/config
|
|
|
|
echo " secure: True" >> $CABALHOME/config
|
|
|
|
echo " key-threshold: 3" >> $CABALHOME/config
|
|
|
|
echo " root-keys:" >> $CABALHOME/config
|
|
|
|
echo " fe331502606802feac15e514d9b9ea83fee8b6ffef71335479a2e68d84adc6b0" >> $CABALHOME/config
|
|
|
|
echo " 1ea9ba32c526d1cc91ab5e5bd364ec5e9e8cb67179a471872f6e26f0ae773d42" >> $CABALHOME/config
|
|
|
|
echo " 2c6c3627bd6c982990239487f1abd02e08a02e6cf16edb105a8012d444d870c3" >> $CABALHOME/config
|
|
|
|
echo " 0a5c7ea47cd1b15f01f5f51a33adda7e655bc0f0b0615baa8e271f4c3351e21d" >> $CABALHOME/config
|
|
|
|
echo " 51f0161b906011b52c6613376b1ae937670da69322113a246a09f807c62f6921" >> $CABALHOME/config
|
2018-07-28 14:40:25 +02:00
|
|
|
- GHCJOBS=-j2
|
2019-03-22 00:27:28 +01:00
|
|
|
- |
|
2018-07-28 14:40:25 +02:00
|
|
|
echo "program-default-options" >> $CABALHOME/config
|
|
|
|
echo " ghc-options: $GHCJOBS +RTS -M6G -RTS" >> $CABALHOME/config
|
2019-03-22 00:27:28 +01:00
|
|
|
- cat $CABALHOME/config
|
|
|
|
- rm -fv cabal.project cabal.project.local cabal.project.freeze
|
|
|
|
- travis_retry ${CABAL} v2-update -v
|
2019-09-11 09:34:29 +02:00
|
|
|
- if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 cabal-plan --constraint='cabal-plan ^>=0.6.0.0' --constraint='cabal-plan +exe' | color_cabal_output) ; fi
|
2019-09-07 10:46:11 +02:00
|
|
|
- if $GHCJS ; then (cd /tmp && ${CABAL} v2-install -w ghc-8.4.4 hspec-discover | color_cabal_output) ; fi
|
2019-03-22 00:27:28 +01:00
|
|
|
# Generate cabal.project
|
|
|
|
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
2019-02-12 00:26:40 +01:00
|
|
|
- touch cabal.project
|
2019-03-22 00:27:28 +01:00
|
|
|
- |
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "packages: servant" >> cabal.project
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-client" >> cabal.project ; fi
|
|
|
|
echo "packages: servant-client-core" >> cabal.project
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-http-streams" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-docs" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-foreign" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-server" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: doc/tutorial" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-machines" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-conduit" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: servant-pipes" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-auth" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/curl-mock" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/basic-streaming" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/db-postgres-pool" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/file-upload" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/generic" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/pagination" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/testing" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/structuring-apis" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/using-custom-monad" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: doc/cookbook/using-free-client" >> cabal.project ; fi
|
2019-03-22 00:27:28 +01:00
|
|
|
- |
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "constraints: foundation >=0.0.14" >> cabal.project
|
|
|
|
echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "constraints: sqlite-simple < 0" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "constraints: base-compat ^>=0.11" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "allow-newer: aeson-pretty-0.8.7:base-compat" >> cabal.project
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
|
|
|
|
echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
|
|
|
|
echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
|
|
|
|
echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
|
|
|
|
echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "allow-newer: io-streams-1.5.1.0:primitive" >> cabal.project
|
|
|
|
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:lens" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:primitive" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:time" >> cabal.project
|
2019-09-30 09:53:32 +02:00
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:base" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:base-compat" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:Cabal" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:lens" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:base" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:base-compat" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:Cabal" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:lens" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-warp-0.9.6.0:time" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "optimization: False" >> cabal.project
|
2019-12-09 13:31:10 +01:00
|
|
|
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
2018-06-18 14:42:16 +02:00
|
|
|
- cat cabal.project || true
|
|
|
|
- cat cabal.project.local || true
|
2019-02-12 00:26:40 +01:00
|
|
|
- if [ -f "servant/configure.ac" ]; then (cd "servant" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-client/configure.ac" ]; then (cd "servant-client" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-client-core/configure.ac" ]; then (cd "servant-client-core" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-http-streams/configure.ac" ]; then (cd "servant-http-streams" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-docs/configure.ac" ]; then (cd "servant-docs" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-foreign/configure.ac" ]; then (cd "servant-foreign" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-server/configure.ac" ]; then (cd "servant-server" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/tutorial/configure.ac" ]; then (cd "doc/tutorial" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-machines/configure.ac" ]; then (cd "servant-machines" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-conduit/configure.ac" ]; then (cd "servant-conduit" && autoreconf -i); fi
|
|
|
|
- if [ -f "servant-pipes/configure.ac" ]; then (cd "servant-pipes" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then (cd "doc/cookbook/basic-auth" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/curl-mock/configure.ac" ]; then (cd "doc/cookbook/curl-mock" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/basic-streaming/configure.ac" ]; then (cd "doc/cookbook/basic-streaming" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then (cd "doc/cookbook/db-postgres-pool" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/file-upload/configure.ac" ]; then (cd "doc/cookbook/file-upload" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/generic/configure.ac" ]; then (cd "doc/cookbook/generic" && autoreconf -i); fi
|
2019-02-28 09:53:24 +01:00
|
|
|
- if [ -f "doc/cookbook/pagination/configure.ac" ]; then (cd "doc/cookbook/pagination" && autoreconf -i); fi
|
2019-02-12 00:26:40 +01:00
|
|
|
- if [ -f "doc/cookbook/testing/configure.ac" ]; then (cd "doc/cookbook/testing" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then (cd "doc/cookbook/structuring-apis" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then (cd "doc/cookbook/using-custom-monad" && autoreconf -i); fi
|
|
|
|
- if [ -f "doc/cookbook/using-free-client/configure.ac" ]; then (cd "doc/cookbook/using-free-client" && autoreconf -i); fi
|
2019-09-07 10:46:11 +02:00
|
|
|
- ${CABAL} v2-freeze $WITHCOMPILER ${TEST} ${BENCH} | color_cabal_output
|
2018-11-24 12:09:08 +01:00
|
|
|
- "cat cabal.project.freeze | sed -E 's/^(constraints: *| *)//' | sed 's/any.//'"
|
|
|
|
- rm cabal.project.freeze
|
2015-01-29 01:18:16 +01:00
|
|
|
script:
|
2019-03-22 00:27:28 +01:00
|
|
|
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
|
|
|
|
# Packaging...
|
|
|
|
- echo 'Packaging...' && echo -en 'travis_fold:start:sdist\\r'
|
|
|
|
- ${CABAL} v2-sdist all | color_cabal_output
|
2019-02-28 09:53:24 +01:00
|
|
|
- echo -en 'travis_fold:end:sdist\\r'
|
2019-03-22 00:27:28 +01:00
|
|
|
# Unpacking...
|
|
|
|
- echo 'Unpacking...' && echo -en 'travis_fold:start:unpack\\r'
|
2018-10-15 17:15:52 +02:00
|
|
|
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
|
2017-12-10 12:29:37 +01:00
|
|
|
- cd ${DISTDIR} || false
|
2019-09-07 10:46:11 +02:00
|
|
|
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec tar -xvf '{}' \;
|
|
|
|
- find . -maxdepth 1 -type f -name '*.tar.gz' -exec rm '{}' \;
|
|
|
|
- PKGDIR_servant="$(find . -maxdepth 1 -type d -regex '.*/servant-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_client="$(find . -maxdepth 1 -type d -regex '.*/servant-client-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_client_core="$(find . -maxdepth 1 -type d -regex '.*/servant-client-core-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_http_streams="$(find . -maxdepth 1 -type d -regex '.*/servant-http-streams-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_docs="$(find . -maxdepth 1 -type d -regex '.*/servant-docs-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_foreign="$(find . -maxdepth 1 -type d -regex '.*/servant-foreign-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_server="$(find . -maxdepth 1 -type d -regex '.*/servant-server-[0-9.]*')"
|
|
|
|
- PKGDIR_tutorial="$(find . -maxdepth 1 -type d -regex '.*/tutorial-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_machines="$(find . -maxdepth 1 -type d -regex '.*/servant-machines-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_conduit="$(find . -maxdepth 1 -type d -regex '.*/servant-conduit-[0-9.]*')"
|
|
|
|
- PKGDIR_servant_pipes="$(find . -maxdepth 1 -type d -regex '.*/servant-pipes-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_basic_auth="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-auth-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_curl_mock="$(find . -maxdepth 1 -type d -regex '.*/cookbook-curl-mock-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_basic_streaming="$(find . -maxdepth 1 -type d -regex '.*/cookbook-basic-streaming-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_db_postgres_pool="$(find . -maxdepth 1 -type d -regex '.*/cookbook-db-postgres-pool-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_file_upload="$(find . -maxdepth 1 -type d -regex '.*/cookbook-file-upload-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_generic="$(find . -maxdepth 1 -type d -regex '.*/cookbook-generic-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_pagination="$(find . -maxdepth 1 -type d -regex '.*/cookbook-pagination-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_testing="$(find . -maxdepth 1 -type d -regex '.*/cookbook-testing-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_structuring_apis="$(find . -maxdepth 1 -type d -regex '.*/cookbook-structuring-apis-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_using_custom_monad="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-custom-monad-[0-9.]*')"
|
|
|
|
- PKGDIR_cookbook_using_free_client="$(find . -maxdepth 1 -type d -regex '.*/cookbook-using-free-client-[0-9.]*')"
|
2019-03-22 00:27:28 +01:00
|
|
|
# Generate cabal.project
|
|
|
|
- rm -rf cabal.project cabal.project.local cabal.project.freeze
|
2019-02-12 00:26:40 +01:00
|
|
|
- touch cabal.project
|
2019-03-22 00:27:28 +01:00
|
|
|
- |
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "packages: ${PKGDIR_servant}" >> cabal.project
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_client}" >> cabal.project ; fi
|
|
|
|
echo "packages: ${PKGDIR_servant_client_core}" >> cabal.project
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_http_streams}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_docs}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_foreign}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_server}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_tutorial}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_machines}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_conduit}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS ; then echo "packages: ${PKGDIR_servant_pipes}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_auth}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_curl_mock}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_basic_streaming}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_db_postgres_pool}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_file_upload}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_generic}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_pagination}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_testing}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_structuring_apis}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_using_custom_monad}" >> cabal.project ; fi
|
|
|
|
if ! $GHCJS && [ $HCNUMVER -ge 80400 ] ; then echo "packages: ${PKGDIR_cookbook_using_free_client}" >> cabal.project ; fi
|
2019-03-22 00:27:28 +01:00
|
|
|
- |
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "constraints: foundation >=0.0.14" >> cabal.project
|
|
|
|
echo "constraints: memory <0.14.12 || >0.14.12" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "constraints: sqlite-simple < 0" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "constraints: base-compat ^>=0.11" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "allow-newer: aeson-pretty-0.8.7:base-compat" >> cabal.project
|
2019-09-07 10:46:11 +02:00
|
|
|
echo "allow-newer: vault-0.3.1.2:hashable" >> cabal.project
|
|
|
|
echo "allow-newer: psqueues-0.2.7.1:hashable" >> cabal.project
|
|
|
|
echo "allow-newer: sqlite-simple-0.4.16.0:semigroups" >> cabal.project
|
|
|
|
echo "allow-newer: direct-sqlite-2.3.24:semigroups" >> cabal.project
|
|
|
|
echo "allow-newer: io-streams-1.5.1.0:network" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "allow-newer: io-streams-1.5.1.0:primitive" >> cabal.project
|
|
|
|
echo "allow-newer: openssl-streams-1.2.2.0:network" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:lens" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:primitive" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-0.9.6.0:time" >> cabal.project
|
2019-09-30 09:53:32 +02:00
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:base" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:base-compat" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:Cabal" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.1:lens" >> cabal.project
|
2019-09-29 22:55:08 +02:00
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:base" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:base-compat" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:Cabal" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-dom-0.9.3.2:lens" >> cabal.project
|
|
|
|
echo "allow-newer: jsaddle-warp-0.9.6.0:time" >> cabal.project
|
2019-09-15 16:24:22 +02:00
|
|
|
echo "optimization: False" >> cabal.project
|
2019-12-09 13:31:10 +01:00
|
|
|
- "for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/-[^-]*$//' | (grep -vE -- '^(cookbook-basic-auth|cookbook-basic-streaming|cookbook-curl-mock|cookbook-db-postgres-pool|cookbook-file-upload|cookbook-generic|cookbook-pagination|cookbook-structuring-apis|cookbook-testing|cookbook-using-custom-monad|cookbook-using-free-client|servant|servant-client|servant-client-core|servant-conduit|servant-docs|servant-foreign|servant-http-streams|servant-machines|servant-pipes|servant-server|tutorial)$' || true) | sed 's/^/constraints: /' | sed 's/$/ installed/' >> cabal.project.local; done"
|
2018-06-18 14:42:16 +02:00
|
|
|
- cat cabal.project || true
|
|
|
|
- cat cabal.project.local || true
|
2019-09-11 09:34:29 +02:00
|
|
|
- |
|
|
|
|
pkgdir() {
|
|
|
|
case $1 in
|
|
|
|
servant) echo ${PKGDIR_servant} ;;
|
|
|
|
servant-client) echo ${PKGDIR_servant_client} ;;
|
|
|
|
servant-client-core) echo ${PKGDIR_servant_client_core} ;;
|
|
|
|
servant-http-streams) echo ${PKGDIR_servant_http_streams} ;;
|
|
|
|
servant-docs) echo ${PKGDIR_servant_docs} ;;
|
|
|
|
servant-foreign) echo ${PKGDIR_servant_foreign} ;;
|
|
|
|
servant-server) echo ${PKGDIR_servant_server} ;;
|
|
|
|
tutorial) echo ${PKGDIR_tutorial} ;;
|
|
|
|
servant-machines) echo ${PKGDIR_servant_machines} ;;
|
|
|
|
servant-conduit) echo ${PKGDIR_servant_conduit} ;;
|
|
|
|
servant-pipes) echo ${PKGDIR_servant_pipes} ;;
|
|
|
|
cookbook-basic-auth) echo ${PKGDIR_cookbook_basic_auth} ;;
|
|
|
|
cookbook-curl-mock) echo ${PKGDIR_cookbook_curl_mock} ;;
|
|
|
|
cookbook-basic-streaming) echo ${PKGDIR_cookbook_basic_streaming} ;;
|
|
|
|
cookbook-db-postgres-pool) echo ${PKGDIR_cookbook_db_postgres_pool} ;;
|
|
|
|
cookbook-file-upload) echo ${PKGDIR_cookbook_file_upload} ;;
|
|
|
|
cookbook-generic) echo ${PKGDIR_cookbook_generic} ;;
|
|
|
|
cookbook-pagination) echo ${PKGDIR_cookbook_pagination} ;;
|
|
|
|
cookbook-testing) echo ${PKGDIR_cookbook_testing} ;;
|
|
|
|
cookbook-structuring-apis) echo ${PKGDIR_cookbook_structuring_apis} ;;
|
|
|
|
cookbook-using-custom-monad) echo ${PKGDIR_cookbook_using_custom_monad} ;;
|
|
|
|
cookbook-using-free-client) echo ${PKGDIR_cookbook_using_free_client} ;;
|
|
|
|
esac
|
|
|
|
}
|
2019-02-28 09:53:24 +01:00
|
|
|
- echo -en 'travis_fold:end:unpack\\r'
|
2019-03-22 00:27:28 +01:00
|
|
|
# Building with tests and benchmarks...
|
|
|
|
- echo 'Building with tests and benchmarks...' && echo -en 'travis_fold:start:build-everything\\r'
|
2017-10-22 11:59:10 +02:00
|
|
|
# build & run tests, build benchmarks
|
2019-09-07 10:46:11 +02:00
|
|
|
- ${CABAL} v2-build $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output
|
2019-02-28 09:53:24 +01:00
|
|
|
- echo -en 'travis_fold:end:build-everything\\r'
|
2019-03-22 00:27:28 +01:00
|
|
|
# Testing...
|
2019-09-07 10:46:11 +02:00
|
|
|
- if ! $GHCJS ; then ${CABAL} v2-test $WITHCOMPILER ${TEST} ${BENCH} all | color_cabal_output ; fi
|
2019-09-11 09:34:29 +02:00
|
|
|
- if $GHCJS ; then cabal-plan list-bins '*:test:*' | while read -r line; do testpkg=$(echo "$line" | perl -pe 's/:.*//'); testexe=$(echo "$line" | awk '{ print $2 }'); echo "testing $textexe in package $textpkg"; (cd "$(pkgdir $testpkg)" && nodejs "$testexe".jsexe/all.js); done ; fi
|
2019-03-22 00:27:28 +01:00
|
|
|
# haddock...
|
|
|
|
- echo 'haddock...' && echo -en 'travis_fold:start:haddock\\r'
|
2019-09-07 10:46:11 +02:00
|
|
|
- if ! $GHCJS ; then ${CABAL} v2-haddock $WITHCOMPILER --with-haddock $HADDOCK ${TEST} ${BENCH} all | color_cabal_output ; fi
|
2019-02-28 09:53:24 +01:00
|
|
|
- echo -en 'travis_fold:end:haddock\\r'
|
2019-03-22 00:27:28 +01:00
|
|
|
|
2019-12-09 13:31:10 +01:00
|
|
|
# REGENDATA ("0.9.20191209",["--config=cabal.haskell-ci","--output=.travis.yml","cabal.project"])
|
2017-10-22 11:59:10 +02:00
|
|
|
# EOF
|