Skip to content

Commit 785d084

Browse files
authored
Merge pull request #84 from phadej/bumpity-2
Bumpity 2
2 parents 4381a44 + 0d87da9 commit 785d084

File tree

4 files changed

+148
-107
lines changed

4 files changed

+148
-107
lines changed

.travis.yml

Lines changed: 132 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,157 @@
1-
# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
1+
# This Travis job script has been generated by a script via
2+
#
3+
# runghc make_travis_yml_2.hs '--ghc-head' '--output' '.travis.yml' 'cabal.project'
4+
#
5+
# For more information, see https://github.com/haskell-CI/haskell-ci
6+
#
27
language: c
38
sudo: false
49

10+
git:
11+
submodules: false # whether to recursively clone submodules
12+
513
cache:
614
directories:
7-
- $HOME/.cabsnap
815
- $HOME/.cabal/packages
16+
- $HOME/.cabal/store
917

1018
before_cache:
1119
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
12-
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
20+
# remove files that are regenerated by 'cabal update'
21+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.*
22+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/*.json
23+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.cache
24+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar
25+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/01-index.tar.idx
1326

14-
env:
15-
global:
16-
- CONF=""
27+
- rm -rfv $HOME/.cabal/packages/head.hackage
1728

1829
matrix:
1930
include:
20-
- env: CABALVER=1.16 GHCVER=7.0.4 CONF="-f -containers042"
21-
compiler: ": #GHC 7.0.4"
22-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.0.4], sources: [hvr-ghc]}}
23-
- env: CABALVER=1.16 GHCVER=7.2.2 CONF="-f -containers042"
24-
compiler: ": #GHC 7.2.2"
25-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.2.2], sources: [hvr-ghc]}}
26-
- env: CABALVER=1.16 GHCVER=7.4.2
27-
compiler: ": #GHC 7.4.2"
28-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.4.2], sources: [hvr-ghc]}}
29-
- env: CABALVER=1.16 GHCVER=7.6.3
30-
compiler: ": #GHC 7.6.3"
31-
addons: {apt: {packages: [cabal-install-1.16,ghc-7.6.3], sources: [hvr-ghc]}}
32-
- env: CABALVER=1.18 GHCVER=7.8.4
33-
compiler: ": #GHC 7.8.4"
34-
addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
35-
- env: CABALVER=1.22 GHCVER=7.10.2
36-
compiler: ": #GHC 7.10.2"
37-
addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
38-
- env: CABALVER=1.24 GHCVER=8.0.1
39-
compiler: ": #GHC 8.0.1"
40-
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
41-
- env: CABALVER=2.0 GHCVER=8.2.2
42-
compiler: ": #GHC 8.2.2"
43-
addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
44-
- env: CABALVER=2.2 GHCVER=8.4.3
45-
compiler: ": #GHC 8.4.3"
46-
addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.3], sources: [hvr-ghc]}}
47-
- env: CABALVER=2.4 GHCVER=8.6.1
48-
compiler: ": #GHC 8.6.1"
49-
addons: {apt: {packages: [cabal-install-2.4,ghc-8.6.1], sources: [hvr-ghc]}}
50-
- env: CABALVER=head GHCVER=head
51-
compiler: ": #GHC head"
52-
addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
31+
- compiler: "ghc-8.6.2"
32+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
33+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.6.2], sources: [hvr-ghc]}}
34+
- compiler: "ghc-8.4.3"
35+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
36+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.4.3], sources: [hvr-ghc]}}
37+
- compiler: "ghc-8.2.2"
38+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
39+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.2.2], sources: [hvr-ghc]}}
40+
- compiler: "ghc-8.0.1"
41+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
42+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-8.0.1], sources: [hvr-ghc]}}
43+
- compiler: "ghc-7.10.2"
44+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
45+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.10.2], 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]}}
52+
- compiler: "ghc-7.4.2"
53+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
54+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.4.2], sources: [hvr-ghc]}}
55+
- compiler: "ghc-7.2.2"
56+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
57+
addons: {apt: {packages: [ghc-ppa-tools,cabal-install-2.4,ghc-7.2.2], sources: [hvr-ghc]}}
58+
- compiler: "ghc-7.0.4"
59+
# env: TEST=--disable-tests BENCH=--disable-benchmarks
60+
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]}}
5364

5465
allow_failures:
55-
- env: CABALVER=head GHCVER=head
66+
- compiler: "ghc-head"
5667

5768
before_install:
58-
- unset CC
59-
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
69+
- HC=${CC}
70+
- HCPKG=${HC/ghc/ghc-pkg}
71+
- unset CC
72+
- ROOTDIR=$(pwd)
73+
- mkdir -p $HOME/.local/bin
74+
- "PATH=/opt/ghc/bin:/opt/ghc-ppa-tools/bin:$HOME/local/bin:$PATH"
75+
- HCNUMVER=$(( $(${HC} --numeric-version|sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+).*/\1 * 10000 + \2 * 100 + \3/') ))
76+
- echo $HCNUMVER
6077

6178
install:
62-
- cabal --version
63-
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
64-
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
65-
then
66-
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
67-
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
68-
fi
69-
- travis_retry cabal update -v
70-
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
71-
- cabal install --only-dependencies --enable-tests --enable-benchmarks $CONF --dry -v > installplan.txt
72-
- sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
73-
74-
# check whether current requested install-plan matches cached package-db snapshot
75-
- if diff -u $HOME/.cabsnap/installplan.txt installplan.txt;
76-
then
77-
echo "cabal build-cache HIT";
78-
rm -rfv .ghc;
79-
cp -a $HOME/.cabsnap/ghc $HOME/.ghc;
80-
cp -a $HOME/.cabsnap/lib $HOME/.cabsnap/share $HOME/.cabsnap/bin $HOME/.cabal/;
81-
else
82-
echo "cabal build-cache MISS";
83-
rm -rf $HOME/.cabsnap;
84-
mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
85-
cabal install --only-dependencies --enable-tests --enable-benchmarks $CONF ;
86-
fi
87-
88-
# snapshot package-db on cache miss
89-
- if [ ! -d $HOME/.cabsnap ];
90-
then
91-
echo "snapshotting package-db to build-cache";
92-
mkdir $HOME/.cabsnap;
93-
cp -a $HOME/.ghc $HOME/.cabsnap/ghc;
94-
cp -a $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin installplan.txt $HOME/.cabsnap/;
95-
fi
79+
- cabal --version
80+
- echo "$(${HC} --version) [$(${HC} --print-project-git-commit-id 2> /dev/null || echo '?')]"
81+
- BENCH=${BENCH---enable-benchmarks}
82+
- TEST=${TEST---enable-tests}
83+
- HADDOCK=${HADDOCK-true}
84+
- UNCONSTRAINED=${UNCONSTRAINED-true}
85+
- NOINSTALLEDCONSTRAINTS=${NOINSTALLEDCONSTRAINTS-false}
86+
- GHCHEAD=${GHCHEAD-false}
87+
- travis_retry cabal update -v
88+
- "sed -i.bak 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config"
89+
- 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
108+
- grep -Ev -- '^\s*--' ${HOME}/.cabal/config | grep -Ev '^\s*$'
109+
- "printf 'packages: \".\" \"fgl-arbitrary\"\\n' > cabal.project"
110+
- touch cabal.project.local
111+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- fgl | grep -vw -- fgl-arbitrary | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
112+
- cat cabal.project || true
113+
- cat cabal.project.local || true
114+
- if [ -f "./configure.ac" ]; then
115+
(cd "." && autoreconf -i);
116+
fi
117+
- if [ -f "fgl-arbitrary/configure.ac" ]; then
118+
(cd "fgl-arbitrary" && autoreconf -i);
119+
fi
120+
- rm -f cabal.project.freeze
121+
- cabal new-build -w ${HC} ${TEST} ${BENCH} --project-file="cabal.project" --dep -j2 all
122+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --project-file="cabal.project" --dep -j2 all
123+
- rm -rf .ghc.environment.* "."/dist "fgl-arbitrary"/dist
124+
- DISTDIR=$(mktemp -d /tmp/dist-test.XXXX)
96125

97126
# Here starts the actual work to be performed for the package under test;
98127
# any command which exits with a non-zero exit code causes the build to fail.
99128
script:
100-
- if [ -f configure.ac ]; then autoreconf -i; fi
101-
- cabal configure --enable-tests --enable-benchmarks -v2 $CONF # -v2 provides useful information for debugging
102-
- cabal build # this builds all libraries and executables (including tests/benchmarks)
103-
- cabal test
104-
- cabal check
105-
- cabal sdist # tests that a source-distribution can be generated
106-
107-
# Check that the resulting source distribution can be built & installed.
108-
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
109-
# `cabal install --force-reinstalls dist/*-*.tar.gz`
110-
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
111-
(cd dist && cabal install --force-reinstalls $CONF "$SRC_TGZ")
112-
113-
# Check the fgl-arbitrary sub-package
114-
- cd fgl-arbitrary
115-
# Relying upon fgl being installed above when testing sdist, and that
116-
# it doesn't require any other dependencies not used by fgl.
117-
- cabal configure --enable-tests --enable-benchmarks -v2
118-
- cabal build
119-
- cabal test
120-
- cabal check
121-
- cabal sdist
122-
- SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
123-
(cd dist && cabal install --force-reinstalls "$SRC_TGZ")
129+
# test that source-distributions can be generated
130+
- cabal new-sdist all
131+
- mv dist-newstyle/sdist/*.tar.gz ${DISTDIR}/
132+
- cd ${DISTDIR} || false
133+
- find . -maxdepth 1 -name '*.tar.gz' -exec tar -xvf '{}' \;
134+
- "printf 'packages: fgl-*/*.cabal fgl-arbitrary-*/*.cabal\\n' > cabal.project"
135+
- touch cabal.project.local
136+
- "if ! $NOINSTALLEDCONSTRAINTS; then for pkg in $($HCPKG list --simple-output); do echo $pkg | grep -vw -- fgl | grep -vw -- fgl-arbitrary | sed 's/^/constraints: /' | sed 's/-[^-]*$/ installed/' >> cabal.project.local; done; fi"
137+
- cat cabal.project || true
138+
- cat cabal.project.local || true
139+
# this builds all libraries and executables (without tests/benchmarks)
140+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
141+
142+
# build & run tests, build benchmarks
143+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
144+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} ${TEST} ${BENCH} all; fi
145+
146+
# cabal check
147+
- (cd fgl-* && cabal check)
148+
- (cd fgl-arbitrary-* && cabal check)
149+
150+
# haddock
151+
- if $HADDOCK; then cabal new-haddock -w ${HC} ${TEST} ${BENCH} all; else echo "Skipping haddock generation";fi
152+
153+
# Build without installed constraints for packages in global-db
154+
- 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
124155

156+
# REGENDATA ["--ghc-head","--output",".travis.yml","cabal.project"]
125157
# EOF

fgl-arbitrary/ChangeLog

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.2.0.4
2+
-------
3+
4+
* QuickCheck and HSpec dependency bump
5+
16
0.2.0.3
27
-------
38

fgl-arbitrary/fgl-arbitrary.cabal

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: fgl-arbitrary
2-
version: 0.2.0.3
2+
version: 0.2.0.4
33
synopsis: QuickCheck support for fgl
44
description:
55
Provides Arbitrary instances for fgl graphs (to avoid adding a
@@ -18,6 +18,10 @@ build-type: Simple
1818
cabal-version: >=1.10
1919
extra-source-files: ChangeLog
2020

21+
tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3,
22+
GHC == 7.8.4, GHC == 7.10.2, GHC == 8.0.1, GHC == 8.2.2,
23+
GHC == 8.4.3, GHC == 8.6.2
24+
2125
source-repository head
2226
type: git
2327
location: git://github.com/haskell/fgl.git
@@ -29,7 +33,7 @@ library
2933
-- other-extensions:
3034
build-depends: base < 5
3135
, fgl >= 5.5.2.0 && < 6
32-
, QuickCheck >= 2.3 && < 2.12
36+
, QuickCheck >= 2.3 && < 2.13
3337
-- hs-source-dirs:
3438
default-language: Haskell2010
3539

@@ -43,8 +47,8 @@ test-suite fgl-arbitrary-tests
4347
build-depends: fgl-arbitrary
4448
, fgl
4549
, base
46-
, QuickCheck >= 2.3 && < 2.12
47-
, hspec >= 2.1 && < 2.6
50+
, QuickCheck >= 2.3 && < 2.13
51+
, hspec >= 2.1 && < 2.7
4852
, containers
4953

5054
hs-source-dirs: test

fgl.cabal

Lines changed: 3 additions & 3 deletions
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.1
22+
GHC == 8.4.3, GHC == 8.6.2
2323

2424
source-repository head
2525
type: git
@@ -91,8 +91,8 @@ test-suite fgl-tests {
9191

9292
build-depends: fgl
9393
, base
94-
, QuickCheck >= 2.8 && < 2.12
95-
, hspec >= 2.1 && < 2.6
94+
, QuickCheck >= 2.8 && < 2.13
95+
, hspec >= 2.1 && < 2.7
9696
, containers
9797

9898
hs-source-dirs: test

0 commit comments

Comments
 (0)