git.iko.soy/typeable/servant
on release-0.15 help sign in
typeable/servant/.travis.yml
192 lines 13 kB history raw
1# This Travis job script has been generated by a script via
2#
3# runghc make_travis_yml_2.hs '--config=cabal.make-travis-yml' '--output=.travis.yml' 'cabal.project'
4#
5# For more information, see https://github.com/haskell-CI/haskell-ci
6#
7language: c
8sudo: false
10git:
11 submodules: false # whether to recursively clone submodules
13branches:
14 only:
15 - master
17cache:
18 directories:
19 - $HOME/.cabal/packages
20 - $HOME/.cabal/store
22before_cache:
23 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
24 # remove files that are regenerated by 'cabal update'
25 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
26 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
27 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
28 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
29 - rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
31 - rm -rfv $HOME/.cabal/packages/head.hackage
33matrix:
34 include:
35 - compiler: "ghc-8.6.2"
36 # env: TEST=--disable-tests BENCH=--disable-benchmarks
37 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.2], sources: [hvr-ghc]}}
38 - compiler: "ghc-8.4.4"
39 # env: TEST=--disable-tests BENCH=--disable-benchmarks
40 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
41 - compiler: "ghc-8.2.2"
42 # env: TEST=--disable-tests BENCH=--disable-benchmarks
43 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
44 - compiler: "ghc-8.0.2"
45 # env: TEST=--disable-tests BENCH=--disable-benchmarks
46 addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
48before_install:
49 - HC=${CC}
50 - HCPKG=${HC/ghc/ghc-pkg}
51 - unset CC
52 - ROOTDIR=$(pwd)
53 - mkdir -p $HOME/.local/bin
54 - "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
55 - HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
56 - echo $HCNUMVER
58install:
59 - cabal --version
60 - echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
61 - BENCH=${BENCH---enable-benchmarks}
62 - TEST=${TEST---enable-tests}
63 - HADDOCK=${HADDOCK-true}
64 - UNCONSTRAINED=${UNCONSTRAINED-true}
65 - NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
66 - GHCHEAD=${GHCHEAD-false}
67 - travis_retry cabal update -v
68 - "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
69 - rm -fv cabal.project cabal.project.local
70 - "if [ $HCNUMVER -ge 70800 ]; then sed -i.bak 's/-- ghc-options:.*/ghc-options: -j2/' ${HOME}/.cabal/config; fi"
71 - grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
72 - "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"servant-machines\" \"servant-conduit\" \"servant-pipes\" \"doc/cookbook/basic-auth\" \"doc/cookbook/curl-mock\" \"doc/cookbook/basic-streaming\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/file-upload\" \"doc/cookbook/generic\" \"doc/cookbook/hoist-server-with-context\" \"doc/cookbook/https\" \"doc/cookbook/jwt-and-basic-auth\" \"doc/cookbook/sentry\" \"doc/cookbook/testing\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\" \"doc/cookbook/using-free-client\"\\n' > cabal.project"
73 - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
74 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
75 - "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server, servant-auth-server:http-api-data,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec,servant-quickcheck:http-client' >> cabal.project"
76 - touch cabal.project.local
77 - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant | grep -vw -- servant-client | grep -vw -- servant-client-core | grep -vw -- servant-docs | grep -vw -- servant-foreign | grep -vw -- servant-server | grep -vw -- tutorial | grep -vw -- servant-machines | grep -vw -- servant-conduit | grep -vw -- servant-pipes | grep -vw -- cookbook-basic-auth | grep -vw -- cookbook-curl-mock | grep -vw -- cookbook-basic-streaming | grep -vw -- cookbook-db-postgres-pool | grep -vw -- cookbook-db-sqlite-simple | grep -vw -- cookbook-file-upload | grep -vw -- cookbook-generic | grep -vw -- cookbook-hoist-server-with-context | grep -vw -- cookbook-https | grep -vw -- cookbook-jwt-and-basic-auth | grep -vw -- cookbook-sentry | grep -vw -- cookbook-testing | grep -vw -- cookbook-structuring-apis | grep -vw -- cookbook-using-custom-monad | grep -vw -- cookbook-using-free-client | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
78 - cat cabal.project || true
79 - cat cabal.project.local || true
80 - if [ -f "servant/configure.ac" ]; then
81 (cd "servant" && autoreconf -i);
82 fi
83 - if [ -f "servant-client/configure.ac" ]; then
84 (cd "servant-client" && autoreconf -i);
85 fi
86 - if [ -f "servant-client-core/configure.ac" ]; then
87 (cd "servant-client-core" && autoreconf -i);
88 fi
89 - if [ -f "servant-docs/configure.ac" ]; then
90 (cd "servant-docs" && autoreconf -i);
91 fi
92 - if [ -f "servant-foreign/configure.ac" ]; then
93 (cd "servant-foreign" && autoreconf -i);
94 fi
95 - if [ -f "servant-server/configure.ac" ]; then
96 (cd "servant-server" && autoreconf -i);
97 fi
98 - if [ -f "doc/tutorial/configure.ac" ]; then
99 (cd "doc/tutorial" && autoreconf -i);
100 fi
101 - if [ -f "servant-machines/configure.ac" ]; then
102 (cd "servant-machines" && autoreconf -i);
103 fi
104 - if [ -f "servant-conduit/configure.ac" ]; then
105 (cd "servant-conduit" && autoreconf -i);
106 fi
107 - if [ -f "servant-pipes/configure.ac" ]; then
108 (cd "servant-pipes" && autoreconf -i);
109 fi
110 - if [ -f "doc/cookbook/basic-auth/configure.ac" ]; then
111 (cd "doc/cookbook/basic-auth" && autoreconf -i);
112 fi
113 - if [ -f "doc/cookbook/curl-mock/configure.ac" ]; then
114 (cd "doc/cookbook/curl-mock" && autoreconf -i);
115 fi
116 - if [ -f "doc/cookbook/basic-streaming/configure.ac" ]; then
117 (cd "doc/cookbook/basic-streaming" && autoreconf -i);
118 fi
119 - if [ -f "doc/cookbook/db-postgres-pool/configure.ac" ]; then
120 (cd "doc/cookbook/db-postgres-pool" && autoreconf -i);
121 fi
122 - if [ -f "doc/cookbook/db-sqlite-simple/configure.ac" ]; then
123 (cd "doc/cookbook/db-sqlite-simple" && autoreconf -i);
124 fi
125 - if [ -f "doc/cookbook/file-upload/configure.ac" ]; then
126 (cd "doc/cookbook/file-upload" && autoreconf -i);
127 fi
128 - if [ -f "doc/cookbook/generic/configure.ac" ]; then
129 (cd "doc/cookbook/generic" && autoreconf -i);
130 fi
131 - if [ -f "doc/cookbook/hoist-server-with-context/configure.ac" ]; then
132 (cd "doc/cookbook/hoist-server-with-context" && autoreconf -i);
133 fi
134 - if [ -f "doc/cookbook/https/configure.ac" ]; then
135 (cd "doc/cookbook/https" && autoreconf -i);
136 fi
137 - if [ -f "doc/cookbook/jwt-and-basic-auth/configure.ac" ]; then
138 (cd "doc/cookbook/jwt-and-basic-auth" && autoreconf -i);
139 fi
140 - if [ -f "doc/cookbook/sentry/configure.ac" ]; then
141 (cd "doc/cookbook/sentry" && autoreconf -i);
142 fi
143 - if [ -f "doc/cookbook/testing/configure.ac" ]; then
144 (cd "doc/cookbook/testing" && autoreconf -i);
145 fi
146 - if [ -f "doc/cookbook/structuring-apis/configure.ac" ]; then
147 (cd "doc/cookbook/structuring-apis" && autoreconf -i);
148 fi
149 - if [ -f "doc/cookbook/using-custom-monad/configure.ac" ]; then
150 (cd "doc/cookbook/using-custom-monad" && autoreconf -i);
151 fi
152 - if [ -f "doc/cookbook/using-free-client/configure.ac" ]; then
153 (cd "doc/cookbook/using-free-client" && autoreconf -i);
154 fi
155 - rm -f cabal.project.freeze
156 - rm -rf .ghc.environment.* "servant"/dist "servant-client"/dist "servant-client-core"/dist "servant-docs"/dist "servant-foreign"/dist "servant-server"/dist "doc/tutorial"/dist "servant-machines"/dist "servant-conduit"/dist "servant-pipes"/dist "doc/cookbook/basic-auth"/dist "doc/cookbook/curl-mock"/dist "doc/cookbook/basic-streaming"/dist "doc/cookbook/db-postgres-pool"/dist "doc/cookbook/db-sqlite-simple"/dist "doc/cookbook/file-upload"/dist "doc/cookbook/generic"/dist "doc/cookbook/hoist-server-with-context"/dist "doc/cookbook/https"/dist "doc/cookbook/jwt-and-basic-auth"/dist "doc/cookbook/sentry"/dist "doc/cookbook/testing"/dist "doc/cookbook/structuring-apis"/dist "doc/cookbook/using-custom-monad"/dist "doc/cookbook/using-free-client"/dist
157 - DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
159# Here starts the actual work to be performed for the package under test;
160# any command which exits with a non-zero exit code causes the build to fail.
161script:
162 # test that source-distributions can be generated
163 - echo Packaging... && echo -en 'travis_fold:start:sdist\\r'
164 - cabal new-sdist all
165 - echo -en 'travis_fold:end:sdist\\r'
166 - echo Unpacking... && echo -en 'travis_fold:start:unpack\\r'
167 - mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
168 - cd ${DISTDIR} || false
169 - find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
170 - "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal servant-machines-*/*.cabal servant-conduit-*/*.cabal servant-pipes-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-curl-mock-*/*.cabal cookbook-basic-streaming-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-file-upload-*/*.cabal cookbook-generic-*/*.cabal cookbook-hoist-server-with-context-*/*.cabal cookbook-https-*/*.cabal cookbook-jwt-and-basic-auth-*/*.cabal cookbook-sentry-*/*.cabal cookbook-testing-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal cookbook-using-free-client-*/*.cabal\\n' > cabal.project"
171 - "printf 'write-ghc-environment-files: always\\n' >> cabal.project"
172 - "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
173 - "echo 'allow-newer: servant-js:base, servant-pagination:servant, servant-pagination:servant-server,servant-multipart:servant, servant-multipart:servant-server,servant-quickcheck:servant, servant-quickcheck:servant-client, servant-quickcheck:servant-server,servant-auth-server:servant, servant-auth-server:servant-server, servant-auth-server:http-api-data,servant-js:servant, servant-js:servant-foreign,servant-quickcheck:hspec,servant-quickcheck:http-client' >> cabal.project"
174 - touch cabal.project.local
175 - "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- servant | grep -vw -- servant-client | grep -vw -- servant-client-core | grep -vw -- servant-docs | grep -vw -- servant-foreign | grep -vw -- servant-server | grep -vw -- tutorial | grep -vw -- servant-machines | grep -vw -- servant-conduit | grep -vw -- servant-pipes | grep -vw -- cookbook-basic-auth | grep -vw -- cookbook-curl-mock | grep -vw -- cookbook-basic-streaming | grep -vw -- cookbook-db-postgres-pool | grep -vw -- cookbook-db-sqlite-simple | grep -vw -- cookbook-file-upload | grep -vw -- cookbook-generic | grep -vw -- cookbook-hoist-server-with-context | grep -vw -- cookbook-https | grep -vw -- cookbook-jwt-and-basic-auth | grep -vw -- cookbook-sentry | grep -vw -- cookbook-testing | grep -vw -- cookbook-structuring-apis | grep -vw -- cookbook-using-custom-monad | grep -vw -- cookbook-using-free-client | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
176 - cat cabal.project || true
177 - cat cabal.project.local || true
178 - echo -en 'travis_fold:end:unpack\\r'
180 - echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
181 # build & run tests, build benchmarks
182 - cabal new-build -w ${HC} ${TEST} ${BENCH} all
183 - echo -en 'travis_fold:end:build-everything\\r'
184 - if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
186 - echo Haddock... && echo -en 'travis_fold:start:haddock\\r'
187 # haddock
188 - if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
190 - echo -en 'travis_fold:end:haddock\\r'
191# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
192# EOF