-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (63 loc) · 2.21 KB
/
.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
sudo: false
cache:
directories:
- $HOME/.stack
- $HOME/zeromq4-x
language: cpp
# TODO: osx takes too long to build initial cache
os:
- linux
env:
- RESOLVER="--resolver=lts-9.9"
- RESOLVER="--resolver=lts-9.10"
# Travis is out of mem'ing on nightly build -- arrrg, travis, arrrrrg, ghc
# - RESOLVER="--resolver=nightly-2017-10-11"
# This works locally but times out on travis, -- arrrg, travis
# - RESOLVER=""
before_install:
- echo "Installing stack..."
- |
if [ `uname` = "Linux" ]; then
mkdir -p $HOME/bin
export PATH=$HOME/.local/bin:$PATH
mkdir -p ~/.local/bin
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
elif [ `uname` = "Darwin" ]; then
brew update
brew install -v haskell-stack
fi
- echo "Zeromq..."
- |
if [ `uname` = "Linux" ]; then
if [ ! -d "$HOME/zeromq4-x/lib" ]; then
git clone http://www.github.com/zeromq/zeromq4-x.git
cd zeromq4-x
./autogen.sh && ./configure --prefix=$HOME/zeromq4-x && make -j4 && make install
cd ..
fi
export PKG_CONFIG_PATH=$HOME/zeromq4-x/lib/pkgconfig
export LD_LIBRARY_PATH=$HOME/zeromq4-x/lib
elif [ `uname` = "Darwin" ]; then
brew install -v zeromq
fi
- pkg-config --modversion libzmq
## Until IHaskell goes on a bigger diet, we need this nonsense
## A clean build gets timed out by travis
## So for now we install a few packages and fail the build in a way that the cache gets committed
## This means each new item in the build matrix _will_ fail on first build.
## Note on osx, the cache is so big, and the bandwidth so limited, that the cache upload process gets timed out.
- |
export do_build="true"
stack setup $RESOLVER
travis_cache_sentinel="$(stack path --snapshot-install-root)/travis_cache_sentinel_1"
echo ${travis_cache_sentinel}
if [ ! -f "${travis_cache_sentinel}" ]; then
echo "Cache Sentinel not found"
set -e
stack install aeson $RESOLVER
touch ${travis_cache_sentinel}
echo "Checkpointing cache on first pass -- Purposely failing build!!!"
export do_build="false"
set +e
fi
script: test/travis.sh