forked from purescript/purescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (91 loc) · 2.26 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
language: c
dist: trusty # because of perf issues
sudo: required
branches:
# Only build master and tagged versions, i.e. not feature branches; feature
# branches already get built after opening a pull request.
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
matrix:
include:
# We use trusty boxes because they seem to be a bit faster.
- os: linux
dist: trusty
sudo: required
env: BUILD_TYPE=normal DEPLOY=true
# - os: linux
# dist: trusty
# sudo: required
# env: BUILD_TYPE=normal STACKAGE_NIGHTLY=true
# allow_failures: true
- os: linux
dist: trusty
sudo: required
env: BUILD_TYPE=normal
# - os: linux
# dist: trusty
# sudo: required
# env: BUILD_TYPE=sdist COVERAGE=true
- os: linux
dist: trusty
sudo: required
env: BUILD_TYPE=haddock
- os: osx
env: BUILD_TYPE=normal DEPLOY=true
- os: osx
env: BUILD_TYPE=sdist
addons:
apt:
packages:
- libgmp-dev
cache:
directories:
- $HOME/.local/bin
- $HOME/.stack
# Maximum amount of time in seconds spent attempting to upload a new cache
# before aborting. Since our cache can get rather large, increasing this
# value helps avoid situations where caches fail to be stored. The default
# value is 180 (at the time of writing).
timeout: 1000
install:
- | # Install stack.
if test ! -f "$HOME/.local/bin/stack"
then
URL="https://www.stackage.org/stack/$TRAVIS_OS_NAME-x86_64"
curl --location "$URL" > stack.tar.gz
gunzip stack.tar.gz
tar -x -f stack.tar --strip-components 1
mkdir -p "$HOME/.local/bin"
mv stack "$HOME/.local/bin/"
fi
- npm install -g bower # for psc-docs / psc-publish tests
- export OS_NAME=$(./travis/convert-os-name.sh)
# Install 'timeout'
- |
if [ "$TRAVIS_OS_NAME" == "osx" ]
then
if ! which gtimeout >/dev/null
then
brew update
brew install coreutils
fi
export TIMEOUT=gtimeout
else
export TIMEOUT=timeout
fi
script:
- travis/build.sh
before_deploy:
- ./bundle/build.sh $OS_NAME
deploy:
provider: releases
api_key: $RELEASE_KEY
file:
- bundle/$OS_NAME.tar.gz
- bundle/$OS_NAME.sha
skip_cleanup: true
on:
all_branches: true
tags: true
condition: "$DEPLOY = true"