Skip to content

Commit f610c11

Browse files
committed
Enable support for GHC Head
1 parent 3b44d17 commit f610c11

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

.travis.yml

Lines changed: 26 additions & 2 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 'fgl.cabal'
3+
# runghc make_travis_yml_2.hs '--ghc-head' 'fgl.cabal'
44
#
55
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
@@ -58,6 +58,12 @@ matrix:
5858
- compiler: "ghc-7.0.4"
5959
# env: TEST=--disable-tests BENCH=--disable-benchmarks
6060
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.0.4], sources: [hvr-ghc]}}
61+
- compiler: "ghc-head"
62+
env: GHCHEAD=true
63+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-head], sources: [hvr-ghc]}}
64+
65+
allow_failures:
66+
- compiler: "ghc-head"
6167

6268
before_install:
6369
- HC=${CC}
@@ -81,6 +87,24 @@ install:
8187
- travis_retry cabal update -v
8288
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
8389
- rm -fv cabal.project cabal.project.local
90+
# Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
91+
- |
92+
if $GHCHEAD; then
93+
sed -i 's/-- allow-newer: .*/allow-newer: *:base/' ${HOME}/.cabal/config
94+
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
95+
96+
echo 'repository head.hackage' >> ${HOME}/.cabal/config
97+
echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
98+
echo ' secure: True' >> ${HOME}/.cabal/config
99+
echo ' root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740' >> ${HOME}/.cabal/config
100+
echo ' 2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb' >> ${HOME}/.cabal/config
101+
echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
102+
echo ' key-threshold: 3' >> ${HOME}/.cabal.config
103+
104+
grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
105+
106+
cabal new-update head.hackage -v
107+
fi
84108
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
85109
- "printf 'packages: \".\"\\n' > cabal.project"
86110
- touch cabal.project.local
@@ -125,5 +149,5 @@ script:
125149
# Build without installed constraints for packages in global-db
126150
- 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
127151

128-
# REGENDATA ["fgl.cabal"]
152+
# REGENDATA ["--ghc-head","fgl.cabal"]
129153
# EOF

fgl.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ extra-source-files:
1919

2020
tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
2121
GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2,
22-
GHC == 8.4.3, GHC == 8.6.2, GHC == 8.7.*
22+
GHC == 8.4.3, GHC == 8.6.2
2323

2424
source-repository head
2525
type: git

0 commit comments

Comments
 (0)