-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean up the cabal file so that the 'hans' and 'network' flags all ma…
…ke sense, have sensible defaults, and produce sensible results. This also created some more complication in the executable, in order to deal with all the cases, and required some additional documentation in the README. I've also set up an initial Travis build that tests all the various combinations so that we don't accidentally drift away over time. (This is a squashed merge of the "hans-network-madness" branch.)
- Loading branch information
Showing
7 changed files
with
184 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
language: c | ||
|
||
sudo: false | ||
|
||
matrix: | ||
include: | ||
- env: CABALVER=1.18 GHCVER=7.8.4 NETWORK=-fnetwork HANS=+hans | ||
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} | ||
- env: CABALVER=1.18 GHCVER=7.8.4 NETWORK=-f-network HANS=+hans | ||
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} | ||
- env: CABALVER=1.18 GHCVER=7.8.4 NETWORK=-fnetwork HANS=-hans | ||
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} | ||
- env: CABALVER=1.18 GHCVER=7.8.4 NETWORK=-f-network HANS=-hans | ||
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}} | ||
- env: CABALVER=1.22 GHCVER=7.10.2 NETWORK=-fnetwork HANS=+hans | ||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2],sources: [hvr-ghc]}} | ||
- env: CABALVER=1.22 GHCVER=7.10.2 NETWORK=-f-network HANS=+hans | ||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2],sources: [hvr-ghc]}} | ||
- env: CABALVER=1.22 GHCVER=7.10.2 NETWORK=-fnetwork HANS=-hans | ||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2],sources: [hvr-ghc]}} | ||
- env: CABALVER=1.22 GHCVER=7.10.2 NETWORK=-f-network HANS=-hans | ||
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2],sources: [hvr-ghc]}} | ||
- env: CABALVER=head GHCVER=head NETWORK=-fnetwork HANS=+hans | ||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} | ||
- env: CABALVER=head GHCVER=head NETWORK=-f-network HANS=+hans | ||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} | ||
- env: CABALVER=head GHCVER=head NETWORK=-fnetwork HANS=-hans | ||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} | ||
- env: CABALVER=head GHCVER=head NETWORK=-f-network HANS=-hans | ||
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} | ||
|
||
allow_failures: | ||
- env: CABALVER=head GHCVER=head NETWORK=-fnetwork HANS=+hans | ||
- env: CABALVER=head GHCVER=head NETWORK=-f-network HANS=+hans | ||
- env: CABALVER=head GHCVER=head NETWORK=-fnetwork HANS=-hans | ||
- env: CABALVER=head GHCVER=head NETWORK=-f-network HANS=-hans | ||
|
||
before_install: | ||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH | ||
|
||
install: | ||
- cabal sandbox init | ||
- cabal update | ||
- cabal install --only-dependencies --enable-tests $NETWORK -f$HANS --constraint="tls $HANS" | ||
- cabal configure --enable-tests $NETWORK -f$HANS --constraint="tls $HANS" | ||
|
||
script: | ||
- cabal build | ||
- cabal check | ||
- cabal test | ||
- cabal sdist # tests that a source-distribution can be generated | ||
# Check that the resulting source distribution can be built & installed. | ||
# If there are no other `.tar.gz` files in `dist`, this can be even simpler: | ||
# `cabal install --force-reinstalls dist/*-*.tar.gz` | ||
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz && | ||
(cd dist && cabal install --force-reinstalls $NETWORK -f$HANS --constraint="tls $HANS" "$SRC_TGZ") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters