forked from facebook/flow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
132 lines (120 loc) · 4.65 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
sudo: false
env:
global:
# DOC_BOT_TOKEN (flow-bot)
- secure: 2Sdk/yAm79iNRpN6U3CT83nDbdeR740lwHLQIoOKGi7jxphWbKq3JNjj2f1Fa4X13sc8yKfEfdQzLSwZVch1fxG4Ib4uzb3RqtH9g0Yf63shl/6EMJE+p83EktNse6BMgSSAkLxruVPE9m7yptmQ0ydlHbO7DLchaTbRs1C73N4=
# AWS_ACCESS_KEY_ID
- secure: HMGkDgbay0TcQtiCm5K4F1Y8trtMT5X5S8nRGrTrKBuI4RIEkTQ06VdQVf96gnhe/7IjDQfAUbXWspSmlpWbIKij4BRHOijezU37sooNUkQp4R+EfPpbJECnuv+4WqZI2bMj2i3sw3b8f1oNCFztzHrpxZQ9oOeQbenf/8c2fQs=
# AWS_SECRET_ACCESS_KEY
- secure: huLKjE7xlxl7HaCLIIVyDaZN9ZsWrR4RcxW+JNUH1F9lM5mbRjAPayawSKRzHViu7u6uUNkjMOJs3lRlWdj8ezH2vnJNm9oNvCOYuSFmBIBELVlXcfbqpX9ZffbJeFiUZ2dOwrDEhm3+WIg6Wr3QbUtVdlMfNvljOJ3CQQc9Yc4=
# NPM_TOKEN
- secure: hzJKtjqujadYb7QiMhCLCieNtTp77aMRaqxorJq2+CT+dMcIh1S/S9jxXsfl4OzidnIv2QHussHo5gOdS3U4JzRsHEgQ5+4HRkpxif1UijVqb4FXgaaS3PuBylV2xtMAlVjOUW+HqSCVxbokhrqWkeTKEozfk18+E8TnuOqhKjU=
# S3_BUCKET (beta.flow.org)
- secure: fEJ1vIc7a7xqZPfbUDL1GbMYTcujVU7JY1wrQvDax8rcEOWEO6fKUomIxGCRKhut7fVlvRVaa8nLzVwyRDeT/KD4x2alQLuxJV9wwVGO/PFb6XDjUXayxzG7EmhzsERY9udh0+//SNShetY+1FbBS5zm6/aDAUenYMrqKqEZJyU=
# CLOUDFRONT_ID
- secure: SbgDWLAqwxJ+/4MdyVDv+ImlPCNIqEc+qMfLmn606QB20ocnS4C8KtKFgZERVcPdBkMiZ2XR5Bk8jrGxPgw0WfxsABe0nxCWn8x6vIUFuScPK4SalTqksNOEuHmSxK4YgmIa855B6KRPQKQyG5HCxWrH2IvDBg7TkCvQG+Rz5cc=
# NOTE: We set the compiler to a bogus "no-op" bash command (":") to work around
# a Travis caching limitation: the cache slug only depends on the compiler name,
# not any other environment vars, so we fake the compiler name to change the
# cache slug. Using `language: cpp` ensures that the `CC` env is set to `gcc`
# instead of our bogus value.
#
# Alternatively, if Travis had ocaml support, it would presumably include the
# ocaml version in the slug like it does for other languages.
#
# See https://github.com/travis-ci/travis-ci/issues/4393
language: cpp
matrix:
include:
- compiler: ": Linux, ocaml 4.03.0, opam 1.2.0"
os: linux
env: OCAML_VERSION=4.03.0 OPAM_VERSION=1.2.0
- compiler: ": Mac, ocaml 4.03.0, opam 1.2.0"
os: osx
env: OCAML_VERSION=4.03.0 OPAM_VERSION=1.2.0
addons:
apt:
sources:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
packages:
- libelf-dev
- aspcud
- yarn
before_install: bash -e resources/travis/before_install.sh
install: bash -e resources/travis/install_deps.sh
script: bash -e resources/travis/build.sh
before_deploy: bash -e resources/travis/before_deploy.sh
cache:
directories:
- $HOME/.flow_cache
- $HOME/.yarn-cache
- node_modules
- resources/travis/node_modules
- src/parser/node_modules
before_cache:
- rm -rf $HOME/.flow_cache/ocaml-*/.opam/log
deploy:
# upload releases to github, from both Mac and Linux
- provider: releases
api_key:
# flow-bot
secure: "l3R6GrPhrqUIXlAcknFA7rKllPmVsY/1cOGtctxFQ6++oC3xd+XawIMVAR78ZtUoirZ+/3KYdY6o3SoGMb6olgnSerR/CXktP4DXuUK6XlHGRxqSRCclWra3DnJutlaiafnurhIruRMIvXeTYiO2Q1MU/nyQVKZtOhJJHEBg0Mc="
repo: facebook/flow
skip_cleanup: true
file_glob: true
file: flow-*.zip
on:
tags: true
condition:
- $OCAML_VERSION = 4.03.0
- $OPAM_VERSION = 1.2.0
# Deploy the parser to npm
- provider: script
repo: facebook/flow
script: bash -e resources/travis/deploy_npm.sh
skip_cleanup: true
on:
tags: true
condition:
- $TRAVIS_OS_NAME = linux
- $OCAML_VERSION = 4.03.0
- $OPAM_VERSION = 1.2.0
# Deploy the website
- provider: script
repo: facebook/flow
script: bash -e resources/travis/deploy.sh
skip_cleanup: true
on:
branch: master
condition:
- $TRAVIS_TAG != "" || $TRAVIS_BRANCH = "master"
- $TRAVIS_OS_NAME = linux
- $OCAML_VERSION = 4.03.0
- $OPAM_VERSION = 1.2.0
# Upload release versions of flow.js
- provider: s3
access_key_id: "$AWS_ACCESS_KEY_ID"
secret_access_key: "$AWS_SECRET_ACCESS_KEY"
bucket: "$S3_BUCKET"
skip_cleanup: true
local_dir: "$HOME/static"
upload-dir: static
on:
tags: true
condition:
- $TRAVIS_OS_NAME = linux
- $OCAML_VERSION = 4.03.0
- $OPAM_VERSION = 1.2.0
# The use of secure prevents forks from spamming irc and email.
# See https://github.com/travis-ci/travis-ci/issues/5063
notifications:
email:
recipients:
# flowtype@fb.com
secure: "AWT9H7vKPWp/GYMxKij58cIn7v5ehpm/4ecNqCCDTDVHNEBoP4z6BJdPZyheOQ0QL47m7E5Qy2okbPRhmItZV74Gm38Ri7lvmm6o5vscv428zcmPiZLsob8ibJkYQC5TnUsJigyr8yoCmIXyj9WPw3Tfm96eoZ/vvnoDQGxQPs4="
irc:
channels:
# chat.freenode.net#flowtype
secure: "OLvGXInHGV66u17k4JPZJTXZyrlqCeAVjVQ+oZuqV5JQo6lep/GtcU6uwmjJOgY/yQR7FPvBG92ru4ef/6CIkIwbCq3Zt/ftfei8rNFO0FlymdC7YXjB8hqN8zs6FIVyxzkjOyg8mX1tRulGwxOLB4yeua9t91RiCkjHtvXeixw="
on_success: change