forked from Nike-Inc/bartlett
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (67 loc) · 3.16 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
69
70
71
72
73
74
75
76
77
# Use new container infrastructure to enable caching
sudo: false
# Choose a lightweight base image; we provide our own build tools.
language: c
# Caching so the next build will be fast too.
cache:
timeout: 900 # 15 minutes
directories:
- $HOME/.stack
- $HOME/.cabal/packages
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
#
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
# addons: {apt: {packages: [libfcgi-dev,libgmp-dev]}}
matrix:
include:
# The Stack builds. We can pass in arbitrary Stack arguments via the ARGS
# variable, such as using --stack-yaml to point to a different file.
# Nightly builds are allowed to fail
- env: BUILD=stack ARGS=""
compiler: ": #stack 8.0.1 OSX"
os: osx
allow_failures:
- env: BUILD=stack ARGS="--resolver nightly"
before_install:
- unset CC
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=~/.local/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- |
if [ `uname` = "Darwin" ]
then
travis_retry curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
install:
- set -ex
- stack +RTS -N2 -RTS --skip-ghc-check --no-terminal $ARGS setup
- stack +RTS -N2 -RTS --skip-ghc-check --no-terminal $ARGS build --only-snapshot
- set +ex
script:
- set -ex
- stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps
- set +ex
# Clean up the test artifacts so we don't have binaries generating .tix files
# on end-user machines. Also strip the binary of debugging symbols to reduce
# final filesize. Finally, tar it up and ship it!
before_deploy:
- |
export BARTLETT_VERSION=$(grep version bartlett.cabal | head -1 | awk -F: '{ print $2 }' | tr -d '[:space:]')
- stack clean && stack build --copy-bins && strip "${HOME}/.local/bin/bartlett"
&& tar czvf "bartlett-static-${BARTLETT_VERSION}.tar.gz" -C "${HOME}/.local/bin/" bartlett
deploy:
provider: releases
skip_cleanup: true
file: "bartlett-static-${BARTLETT_VERSION}.tar.gz"
api_key:
secure: dK7FmqiQzBdRRtsfhyFpxCwr+q501HTBsabhoZjO6r48mTihfmdLVyUvkH6dczkDnPo7XuWZl+sMb4buZzHbb44cigjFkjmEyUzZHZHlbII3MwWv9exL36AGhhyfghspkCtw/AxUCwNmIbz9Hyy+CGtIvEZmsbRBQCOZu0MxbTaU6WL3LZsXEgA3Ej1+I8IenGlhYs4I+Xo5ZOzMPYyK/suHoYuxqTbhpjzc2KbvuzBHPILMZWvcOoSbFNRs4NXnk9fcmR5B7gl9ZqIGY6iQ1vnQOEsy+G2QPKUzouAhXZ0QDGrwf0BF6C1Qmt0eDH/l93D4YVNLoInTuFbUuj5VFTwvZzz6remCrDQtE7EJJTbsG1WRJ6sEnwuGXN9O5j//LgVHW4WNlponmoZcMTgb9MvUB5gSiik04vsNYzRwUeBlOt01AmS2oUu0jxUbFWSXj+Mn7Kb7j/HoQNy1tW0NToWCEQHV4Qjbip38JIhrCqgxgCXgCSw3qo1kZSURDm6PXtvRodciYbFoMtnEFIRJ66nAUC2plhpxKAmx64lYKJueJ9rhGI6X07zwPmgvpHgutPlE43SocQQQmVGXQXfg2WleCMAM4kbIhj7b5/4etFB/aAnEA5uHn9gaYJvwrZccKk/3T+kfSA77FkguQR4Rpt/WTJWftEjkaK/CMUxUuYQ=
on:
repo: Nike-Inc/bartlett
tags: true