forked from nikita-volkov/base-prelude
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
35 lines (33 loc) · 956 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
env:
- ghc=7.6.1
- ghc=7.8.1
- ghc=7.10.1
install:
# Set up the Shell to treat the semicolon as &&
- set -o pipefail && set -e
# Install GHC and Cabal
-
travis_retry sudo add-apt-repository -y ppa:hvr/ghc;
travis_retry sudo apt-get update;
travis_retry sudo apt-get install cabal-install-1.22 ghc-$ghc;
export PATH=/opt/ghc/$ghc/bin:/opt/cabal/1.22/bin:$PATH;
# Update the Cabal database
- cabal update
# Switch to the distro:
-
export pkg_name=$(cabal info . | awk '{print $2;exit}');
cabal sdist;
cd dist;
tar xzvf $pkg_name.tar.gz;
cd $pkg_name;
# Install the library dependencies
- cabal install --only-dependencies --enable-tests
# Build the library
- cabal build
# Configure and build the remaining stuff
- cabal configure
--enable-tests
$([ "$build_benchmarks" = "1" ] && echo "--enable-benchmarks")
- cabal build
script:
- cabal test --show-details=always