Skip to content
This repository was archived by the owner on Feb 27, 2024. It is now read-only.

Commit e5c82b8

Browse files
committed
Update ghc versions to use for CI builds.
1 parent ee578da commit e5c82b8

File tree

2 files changed

+39
-45
lines changed

2 files changed

+39
-45
lines changed

.travis.yml

+37-43
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# runghc make_travis_yml_2.hs '--no-installed' '--doctest' '--hlint' '-o' '.travis.yml' 'hackage-db.cabal'
3+
# runghc make_travis_yml_2.hs '--doctest' '--hlint' '-o' '.travis.yml' 'hackage-db.cabal'
44
#
5-
# For more information, see https://github.com/hvr/multi-ghc-travis
5+
# For more information, see https://github.com/haskell-CI/haskell-ci
66
#
77
language: c
88
sudo: false
@@ -28,27 +28,27 @@ before_cache:
2828

2929
matrix:
3030
include:
31-
- compiler: "ghc-7.6.3"
31+
- compiler: "ghc-8.6.2"
3232
# env: TEST=--disable-tests BENCH=--disable-benchmarks
33-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.6.3], sources: [hvr-ghc]}}
34-
- compiler: "ghc-7.8.4"
33+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.2], sources: [hvr-ghc]}}
34+
- compiler: "ghc-8.4.4"
3535
# env: TEST=--disable-tests BENCH=--disable-benchmarks
36-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.8.4], sources: [hvr-ghc]}}
37-
- compiler: "ghc-7.10.3"
36+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.4], sources: [hvr-ghc]}}
37+
- compiler: "ghc-8.2.2"
3838
# env: TEST=--disable-tests BENCH=--disable-benchmarks
39-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-7.10.3], sources: [hvr-ghc]}}
39+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
4040
- compiler: "ghc-8.0.2"
4141
# env: TEST=--disable-tests BENCH=--disable-benchmarks
42-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.0.2], sources: [hvr-ghc]}}
43-
- compiler: "ghc-8.2.2"
42+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.2], sources: [hvr-ghc]}}
43+
- compiler: "ghc-7.10.3"
4444
# env: TEST=--disable-tests BENCH=--disable-benchmarks
45-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.2.2], sources: [hvr-ghc]}}
46-
- compiler: "ghc-8.4.1"
47-
env: GHCHEAD=true
48-
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-head,ghc-8.4.1], sources: [hvr-ghc]}}
49-
50-
allow_failures:
51-
- compiler: "ghc-8.4.1"
45+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.3], sources: [hvr-ghc]}}
46+
- compiler: "ghc-7.8.4"
47+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
48+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.8.4], sources: [hvr-ghc]}}
49+
- compiler: "ghc-7.6.3"
50+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
51+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.6.3], sources: [hvr-ghc]}}
5252

5353
before_install:
5454
- HC=${CC}
@@ -66,31 +66,21 @@ install:
6666
- BENCH=${BENCH---enable-benchmarks}
6767
- TEST=${TEST---enable-tests}
6868
- HADDOCK=${HADDOCK-true}
69-
- INSTALLED=${INSTALLED-true}
69+
- UNCONSTRAINED=${UNCONSTRAINED-true}
70+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-true}
7071
- GHCHEAD=${GHCHEAD-false}
7172
- travis_retry cabal update -v
7273
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
7374
- rm -fv cabal.project cabal.project.local
74-
# Overlay Hackage Package Index for GHC HEAD: https://github.com/hvr/head.hackage
75-
- |
76-
if $GHCHEAD; then
77-
sed -i.bak 's/-- allow-newer:.*/allow-newer: *:base, *:template-haskell, *:ghc, *:Cabal/' ${HOME}/.cabal/config
78-
79-
echo 'repository head.hackage' >> ${HOME}/.cabal/config
80-
echo ' url: http://head.hackage.haskell.org/' >> ${HOME}/.cabal/config
81-
echo ' secure: True' >> ${HOME}/.cabal/config
82-
echo ' root-keys: 07c59cb65787dedfaef5bd5f987ceb5f7e5ebf88b904bbd4c5cbdeb2ff71b740' >> ${HOME}/.cabal/config
83-
echo ' 2e8555dde16ebd8df076f1a8ef13b8f14c66bad8eafefd7d9e37d0ed711821fb' >> ${HOME}/.cabal/config
84-
echo ' 8f79fd2389ab2967354407ec852cbe73f2e8635793ac446d09461ffb99527f6e' >> ${HOME}/.cabal/config
85-
echo ' key-threshold: 3' >> ${HOME}/.cabal.config
86-
87-
cabal new-update head.hackage -v
88-
fi
8975
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
90-
- if [ $HCNUMVER -ge 80000 ]; then cabal new-install -w ${HC} --symlink-bindir=$HOME/.local/bin doctest --constraint='doctest ==0.13.*'; fi
91-
- if [ $HCNUMVER -eq 80202 ]; then cabal new-install -w ${HC} --symlink-bindir=$HOME/.local/bin hlint --constraint='hlint ==2.0.*'; fi
76+
- (cd /tmp && echo '' | cabal new-repl -w ${HC} --build-dep fail)
77+
- if [ $HCNUMVER -ge 80000 ]; then cabal new-install -w ${HC} -j2 --symlink-bindir=$HOME/.local/bin doctest --constraint='doctest ==0.16.*'; fi
78+
- if [ $HCNUMVER -eq 80602 ]; then cabal new-install -w ${HC} -j2 --symlink-bindir=$HOME/.local/bin hlint --constraint='hlint ==2.1.*'; fi
9279
- "printf 'packages: \".\"\\n' > cabal.project"
93-
- cat cabal.project
80+
- touch cabal.project.local
81+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- hackage-db | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
82+
- cat cabal.project || true
83+
- cat cabal.project.local || true
9484
- if [ -f "./configure.ac" ]; then
9585
(cd "." && autoreconf -i);
9686
fi
@@ -104,31 +94,35 @@ install:
10494
# any command which exits with a non-zero exit code causes the build to fail.
10595
script:
10696
# test that source-distributions can be generated
107-
- (cd "." && cabal sdist)
108-
- mv "."/dist/hackage-db-*.tar.gz ${DISTDIR}/
97+
- cabal new-sdist all
98+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
10999
- cd ${DISTDIR} || false
110100
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
111101
- "printf 'packages: hackage-db-*/*.cabal\\n' > cabal.project"
112-
- cat cabal.project
102+
- touch cabal.project.local
103+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- hackage-db | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
104+
- cat cabal.project || true
105+
- cat cabal.project.local || true
113106
# this builds all libraries and executables (without tests/benchmarks)
114107
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
115108

116-
117109
# build & run tests, build benchmarks
118110
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
119111

120112
# doctest
121113
- if [ $HCNUMVER -ge 80000 ]; then (cd hackage-db-* && doctest src); fi
122114

123115
# hlint
124-
- if [ $HCNUMVER -eq 80202 ]; then (cd hackage-db-* && hlint src); fi
116+
- if [ $HCNUMVER -eq 80602 ]; then (cd hackage-db-* && hlint src); fi
125117

126118
# cabal check
127119
- (cd hackage-db-* && cabal check)
128120

129121
# haddock
130-
- rm -rf ./dist-newstyle
131122
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
132123

133-
# REGENDATA ["--no-installed","--doctest","--hlint","-o",".travis.yml","hackage-db.cabal"]
124+
# Build without installed constraints for packages in global-db
125+
- 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
126+
127+
# REGENDATA ["--doctest","--hlint","-o",".travis.yml","hackage-db.cabal"]
134128
# EOF

hackage-db.cabal

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ category: Distribution
1010
synopsis: Access cabal-install's Hackage database via Data.Map
1111
cabal-version: >= 1.10
1212
build-type: Simple
13-
tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3
14-
, GHC == 8.0.2, GHC == 8.2.2, GHC == 8.4.1
13+
tested-with: GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2
14+
, GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.2
1515

1616
description:
1717
This library provides convenient access to the local copy of the Hackage

0 commit comments

Comments
 (0)