|
@@ -4,12 +4,6 @@ sudo: false
|
4
|
4
|
# Choose a lightweight base image; we provide our own build tools.
|
5
|
5
|
language: c
|
6
|
6
|
|
7
|
|
-# GHC depends on GMP. You can add other dependencies here as well.
|
8
|
|
-addons:
|
9
|
|
- apt:
|
10
|
|
- packages:
|
11
|
|
- - libgmp-dev
|
12
|
|
-
|
13
|
7
|
# The different configurations we want to test. You could also do things like
|
14
|
8
|
# change flags or use --stack-yaml to point to a different file.
|
15
|
9
|
env:
|
|
@@ -36,12 +30,21 @@ before_install:
|
36
|
30
|
# executables, and test suites, and runs the test suites. --no-terminal works
|
37
|
31
|
# around some quirks in Travis's terminal implementation.
|
38
|
32
|
script:
|
39
|
|
-- stack $ARGS --no-terminal install --test --fast
|
40
|
33
|
- export PATH=$(stack $ARGS path | grep compiler-bin | awk '{print $2}'):$PATH
|
|
34
|
+- export DIST_DIR=$(stack $ARGS path | grep dist-dir | awk '{print $2}')
|
|
35
|
+- export ARCH=$(echo $DIST_DIR | cut -d '/' -f 3)
|
|
36
|
+- export GHC_VER=$(ghc --version | awk '{print $8}')
|
|
37
|
+- stack $ARGS --no-terminal install --test --fast
|
41
|
38
|
- stack $ARGS sdist ringo-core && cd ringo-core && ../test_sdist
|
42
|
|
-- cd $(stack $ARGS path | grep project-root | awk '{print $2}')
|
|
39
|
+- cd $TRAVIS_BUILD_DIR
|
43
|
40
|
- stack $ARGS sdist ringo && cd ringo && ../test_sdist
|
44
|
41
|
|
|
42
|
+before_cache:
|
|
43
|
+- cd $TRAVIS_BUILD_DIR
|
|
44
|
+- rm -rf .stack-work/logs;
|
|
45
|
+- rm -rf $HOME/.cabal/logs;
|
|
46
|
+- rm -rf $HOME/.cabal/lib/$ARCH-ghc-$GHC_VER/ringo*
|
|
47
|
+
|
45
|
48
|
# Caching so the next build will be fast too.
|
46
|
49
|
cache:
|
47
|
50
|
directories:
|