Skip to content

Commit e552947

Browse files
committed
Regenerate .travis.yml
1 parent 2edaa5d commit e552947

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.travis.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ install:
6464
- BENCH=${BENCH---enable-benchmarks}
6565
- TEST=${TEST---enable-tests}
6666
- HADDOCK=${HADDOCK-true}
67-
- INSTALLED=${INSTALLED-true}
67+
- UNCONSTRAINED=${UNCONSTRAINED-true}
68+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
6869
- GHCHEAD=${GHCHEAD-false}
6970
- travis_retry cabal update -v
7071
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
@@ -74,7 +75,10 @@ install:
7475
- "printf 'packages: \"servant\" \"servant-client\" \"servant-client-core\" \"servant-docs\" \"servant-foreign\" \"servant-server\" \"doc/tutorial\" \"doc/cookbook/basic-auth\" \"doc/cookbook/db-postgres-pool\" \"doc/cookbook/db-sqlite-simple\" \"doc/cookbook/https\" \"doc/cookbook/pagination\" \"doc/cookbook/structuring-apis\" \"doc/cookbook/using-custom-monad\"\\n' > cabal.project"
7576
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
7677
- "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base, servant-js:servant,servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
77-
- cat cabal.project
78+
- touch cabal.project.local
79+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
80+
- cat cabal.project || true
81+
- cat cabal.project.local || true
7882
- if [ -f "servant/configure.ac" ]; then
7983
(cd "servant" && autoreconf -i);
8084
fi
@@ -148,10 +152,12 @@ script:
148152
- "printf 'packages: servant-*/*.cabal servant-client-*/*.cabal servant-client-core-*/*.cabal servant-docs-*/*.cabal servant-foreign-*/*.cabal servant-server-*/*.cabal tutorial-*/*.cabal cookbook-basic-auth-*/*.cabal cookbook-db-postgres-pool-*/*.cabal cookbook-db-sqlite-simple-*/*.cabal cookbook-https-*/*.cabal cookbook-pagination-*/*.cabal cookbook-structuring-apis-*/*.cabal cookbook-using-custom-monad-*/*.cabal\\n' > cabal.project"
149153
- "echo 'constraints: foundation >=0.0.14,memory <0.14.12 || >0.14.12' >> cabal.project"
150154
- "echo 'allow-newer: servant-auth-server:http-types,servant-auth-server:servant-server, http-media:base, servant-js:servant,servant-pagination:servant,servant-pagination:servant-server' >> cabal.project"
151-
- cat cabal.project
155+
- touch cabal.project.local
156+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
157+
- cat cabal.project || true
158+
- cat cabal.project.local || true
152159
- echo -en 'travis_fold:end:unpack\\r'
153160

154-
155161
- echo Building with tests and benchmarks... && echo -en 'travis_fold:start:build-everything\\r'
156162
# build & run tests, build benchmarks
157163
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
@@ -164,5 +170,10 @@ script:
164170
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
165171

166172
- echo -en 'travis_fold:end:haddock\\r'
173+
- echo Building without installed constraints for packages in global-db... && echo -en 'travis_fold:start:build-installed\\r'
174+
# Build without installed constraints for packages in global-db
175+
- if $UNCONSTRAINED; then rm -f cabal.project.local; echo cabal new-build -w ${HC} --disable-tests --disable-benchmarks all; else echo "Not building without installed constraints"; fi
176+
177+
- echo -en 'travis_fold:end:build-installed\\r'
167178
# REGENDATA ["--config=cabal.make-travis-yml","--output=.travis.yml","cabal.project"]
168179
# EOF

0 commit comments

Comments
 (0)