Skip to content

Commit c986d97

Browse files
committed
Update dependencies to allow building with GHC 7.10.
Added Travis config that supports building all various versions.
1 parent 377e28a commit c986d97

File tree

3 files changed

+27
-20
lines changed

3 files changed

+27
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@
1010
cabal.config
1111
cabal.sandbox.config
1212
examples/Group
13+
*.sublime-*

.travis.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,42 @@
1-
# NB: don't set `language: haskell` here
2-
31
# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
42
env:
5-
- GHCVER=7.4.2
6-
- GHCVER=7.6.3
7-
- GHCVER=7.8.2
8-
# - GHCVER=head # see section about GHC HEAD snapshots
3+
- CABALVER=1.18 GHCVER=7.6.3
4+
- CABALVER=1.18 GHCVER=7.8.3
5+
- CABALVER=1.22 GHCVER=7.10.1
6+
- CABALVER=head GHCVER=head # see section about GHC HEAD snapshots
97

108
# Note: the distinction between `before_install` and `install` is not important.
119
before_install:
12-
- sudo add-apt-repository -y ppa:hvr/ghc
13-
- sudo apt-get update
14-
- sudo apt-get install cabal-install-1.18 ghc-$GHCVER happy
15-
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
10+
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
11+
- travis_retry sudo apt-get update
12+
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
13+
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
1614

1715
install:
18-
- cabal-1.18 update
19-
- cabal-1.18 install --only-dependencies --enable-tests --enable-benchmarks
16+
- cabal --version
17+
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
18+
- travis_retry cabal update
19+
- cabal install --only-dependencies --enable-tests --enable-benchmarks
20+
21+
matrix:
22+
allow_failures:
23+
- env: CABALVER=head GHCVER=head
2024

2125
# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
2226
script:
23-
- cabal-1.18 configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
24-
- cabal-1.18 build # this builds all libraries and executables (including tests/benchmarks)
25-
- cabal-1.18 check
26-
- cabal-1.18 sdist # tests that a source-distribution can be generated
27+
- if [ -f configure.ac ]; then autoreconf -i; fi
28+
- cabal configure --enable-tests --enable-benchmarks -v2 # -v2 provides useful information for debugging
29+
- cabal build # this builds all libraries and executables (including tests/benchmarks)
30+
- cabal test
31+
- cabal check
32+
- cabal sdist # tests that a source-distribution can be generated
2733

2834
# The following scriptlet checks that the resulting source distribution can be built & installed
29-
- export SRC_TGZ=$(cabal-1.18 info . | awk '{print $2 ".tar.gz";exit}') ;
35+
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ;
3036
cd dist/;
3137
if [ -f "$SRC_TGZ" ]; then
32-
cabal-1.18 install "$SRC_TGZ";
38+
cabal install --force-reinstalls "$SRC_TGZ";
3339
else
3440
echo "expected '$SRC_TGZ' not found";
3541
exit 1;
36-
fi
42+
fi

ekg-core.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ library
2828
System.Metrics.ThreadId
2929

3030
build-depends:
31-
ghc-prim < 0.4,
31+
ghc-prim < 0.5,
3232
base >= 4.5 && < 4.9,
3333
containers >= 0.5 && < 0.6,
3434
text < 1.3,

0 commit comments

Comments
 (0)