This repository has been archived by the owner on Sep 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
.travis.yml
108 lines (106 loc) · 3.88 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
language: rust
rust:
- stable
matrix:
include:
- os: linux
sudo: required
dist: trusty
env:
- HOST_TRIPLE=x86_64-unknown-linux-musl
- os: osx
env:
- HOST_TRIPLE=x86_64-apple-darwin
services:
- postgresql
- redis
env:
global:
- AWS_ACCESS_KEY_ID=AKIAIUEJ6IB7XWPIBUXA
- SCCACHE_VERSION=0.2.8
- SCCACHE_BUCKET=fly-proxy-sccache
- RUSTUP_HOME=$HOME/.rustup/
cache:
yarn: true
directories:
- node_modules
- v8env/node_modules
- third_party/flatbuffers
- "$HOME/Library/Caches/Homebrew"
- "$RUSTUP_HOME"
- $HOME/.cargo/registry/index/
- $HOME/.cargo/registry/cache/
addons:
postgresql: '9.6'
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc-5
- g++-5
- binutils-2.26
before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export CXX="g++-5" CC="gcc-5"
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-5 100
sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-5 100
export PATH=/usr/lib/binutils-2.26/bin:${PATH}
fi
install:
- export RELEASE_NAME=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH;
else echo pr$TRAVIS_PULL_REQUEST_BRANCH; fi)
- export RELEASE_FILENAME=fly-${TRAVIS_OS_NAME}-x64.tar.gz
- export PATH=$PATH:$TRAVIS_BUILD_DIR/third_party/flatbuffers/
- curl -SsL https://github.com/mozilla/sccache/releases/download/${SCCACHE_VERSION}/sccache-${SCCACHE_VERSION}-${HOST_TRIPLE}.tar.gz | tar xzv -C /tmp
- mv /tmp/sccache-${SCCACHE_VERSION}-${HOST_TRIPLE}/sccache $HOME/.cargo/bin/sccache
- export RUSTC_WRAPPER=~/.cargo/bin/sccache
- |-
# Remove unnnecessary cargo and rustup directories.
# This keeps the Travis CI cache small and fast.
rm -rf "$RUSTUP_HOME"downloads
rm -rf "$RUSTUP_HOME"tmp
rm -rf "$RUSTUP_HOME"toolchains/*/etc
rm -rf "$RUSTUP_HOME"toolchains/*/share
before_script:
- "./scripts/setup.sh"
- sccache --start-server
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm -rf /usr/local/var/postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then initdb /usr/local/var/postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then while ! pg_isready; do sleep 1; done;
createuser -s postgres; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew services start redis; fi
script:
- RUST_BACKTRACE=1 cargo test --features openssl_vendored
- RUST_BACKTRACE=1 cargo run --features openssl_vendored --bin fly test "v8env/tests/**/*.spec.*"
- "./scripts/build-release.sh"
- sccache --stop-server
before_cache:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew cleanup; fi
before_deploy:
- "./scripts/prepare-release.sh"
deploy:
- provider: releases
overwrite: true
api_key:
secure: VsCHyGpPc02F3LiK+nqMDSPSEKmzgKyAhwVJQJ2mLjso74N1NGRsCDgKIQAOoLzcJRVNZFrpnlbOxKoyTGg1x8b6MnpPmqR8j/LVdKoud6Nhp8Ufw1I/9XwPpyjAhSNKnQq+1h1DpbWbob4bS5BR23PRbIySPUx570W3G8y3IritqorvpM4Qn12fyetWoZxRxWt9QAnrEV2Pj8ULR1C2jBtQPNAVLKm5FcDPBxzQcqXRZjARQtdjNU5tOB1bEm4zg8QNl/hDHi+5WZ/FQ/gZR28cAdhAb8GTC8UU7hTP5TTt2G1UimI27RPxyAyc/eJ9JU2ixRGzjDPvv6hk+KkGGjvuJccKHqR+bgHJ8lS8gPPmpvRMM9uVTAsI/pPA51OgveaHknMCCefiDYGgMq2cIW3UmUMHaB1m9SmBrIqCfEOwPp8f4KEtO55B9myuvqOYvlL4pJrcSUucjNGkm7guqCR4u3L3D0cIkTyk3fTbZyaeAxkSlcYvcff8BpRuFI8YiTybtLxqy0+KoDNoXr/d34/dwFyQNeRPN7H4EWGkzFeHpbfm+aCXGtqF8fMj/tOT7yrOAwy2rvD9/Gx8nzdY7j+DMIXB9HAR3y5Xrpiba0nedV4jww2s1dKuf96Iac3CZrO1qOXvNMKPCVSrp/rmQ5r6REfTQDe6NBONPvjjTX0=
file: release/${RELEASE_FILENAME}
skip_cleanup: true
on:
repo: superfly/fly.rs
tags: true
- provider: s3
access_key_id: "$AWS_ACCESS_KEY_ID"
secret_access_key: "$AWS_SECRET_ACCESS_KEY"
bucket: fly-proxy
local_dir: release
upload-dir: "${RELEASE_NAME}"
skip_cleanup: true
acl: public_read
region: us-east-1
detect_encoding: true
on:
repo: superfly/fly.rs
all_branches: true