Skip to content

Commit ee3e99a

Browse files
phadejRyanGlScott
authored andcommitted
Try omit-local-package (#116)
1 parent 2bcd73f commit ee3e99a

File tree

2 files changed

+22
-8
lines changed

2 files changed

+22
-8
lines changed

.travis.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--no-installed' 'cabal.project'
3+
# runghc make_travis_yml_2.hs '-o' '.travis.yml' '--ghc-head' '--no-unconstrained' 'cabal.project'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -28,6 +28,9 @@ before_cache:
2828

2929
matrix:
3030
include:
31+
- compiler: "ghc-8.6.1"
32+
env: GHCHEAD=true
33+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.6.1], sources: [hvr-ghc]}}
3134
- compiler: "ghc-8.4.3"
3235
# env: TEST=--disable-tests BENCH=--disable-benchmarks
3336
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
@@ -91,6 +94,7 @@ matrix:
9194

9295
allow_failures:
9396
- compiler: "ghc-head"
97+
- compiler: "ghc-8.6.1"
9498

9599
before_install:
96100
- HC=${CC}
@@ -108,15 +112,17 @@ install:
108112
- BENCH=${BENCH---enable-benchmarks}
109113
- TEST=${TEST---enable-tests}
110114
- HADDOCK=${HADDOCK-true}
111-
- INSTALLED=${INSTALLED-true}
115+
- UNCONSTRAINED=${UNCONSTRAINED-true}
116+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
112117
- GHCHEAD=${GHCHEAD-false}
113118
- travis_retry cabal update -v
114119
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
115120
- rm -fv cabal.project cabal.project.local
116121
# Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
117122
- |
118123
if $GHCHEAD; then
119-
sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
124+
sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config
125+
for pkg in $($HCPKG list --simple-output); do pkg=$(echo $pkg | sed 's/-[^-]*$//'); sed -i "s/allow-newer: /allow-newer: *:$pkg, /" ${HOME}/.cabal/config; done
120126
121127
echo 'repository head.hackage' >> ${HOME}/.cabal/config
122128
echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
@@ -126,11 +132,16 @@ install:
126132
echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
127133
echo ' key-threshold: 3' >> ${HOME}/.cabal.config
128134
135+
grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
136+
129137
cabal new-update head.hackage -v
130138
fi
131139
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
132140
- "printf 'packages: \".\"\\n' > cabal.project"
133-
- cat cabal.project
141+
- touch cabal.project.local
142+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- unix | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
143+
- cat cabal.project || true
144+
- cat cabal.project.local || true
134145
- if [ -f "./configure.ac" ]; then
135146
(cd "." && autoreconf -i);
136147
fi
@@ -149,11 +160,13 @@ script:
149160
- cd ${DISTDIR} || false
150161
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
151162
- "printf 'packages: unix-*/*.cabal\\n' > cabal.project"
152-
- cat cabal.project
163+
- touch cabal.project.local
164+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- unix | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
165+
- cat cabal.project || true
166+
- cat cabal.project.local || true
153167
# this builds all libraries and executables (without tests/benchmarks)
154168
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
155169

156-
157170
# build & run tests, build benchmarks
158171
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
159172

@@ -164,5 +177,5 @@ script:
164177
- rm -rf ./dist-newstyle
165178
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
166179

167-
# REGENDATA ["-o",".travis.yml","--ghc-head","--no-installed","cabal.project"]
180+
# REGENDATA ["-o",".travis.yml","--ghc-head","--no-unconstrained","cabal.project"]
168181
# EOF

unix.cabal

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ bug-reports: https://github.com/haskell/unix/issues
1111
synopsis: POSIX functionality
1212
category: System
1313
build-type: Configure
14-
tested-with: GHC==8.4.3, GHC==8.4.2, GHC==8.4.1,
14+
tested-with: GHC==8.6.1,
15+
GHC==8.4.3, GHC==8.4.2, GHC==8.4.1,
1516
GHC==8.2.2, GHC==8.2.1,
1617
GHC==8.0.2, GHC==8.0.1,
1718
GHC==7.10.3, GHC==7.10.2, GHC==7.10.1,

0 commit comments

Comments
 (0)