forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
160 lines (152 loc) · 6.53 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
sudo: false
language: c++
git:
depth: 1
env:
global:
- RUST_VERSION=1.33.0
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
- RUSTUP_HOME=$HOME/.rustup/
- RUST_BACKTRACE=full
- CARGO_TARGET_DIR=$HOME/target
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_HOME/bin:$PATH
- PYTHONPATH=third_party/python_packages
- RUSTC_WRAPPER=sccache
- SCCACHE_BUCKET=deno-sccache
- AWS_ACCESS_KEY_ID=AKIAIVRN52PLDBP55LBQ
# AWS_SECRET_ACCESS_KEY=...
- secure: "ugSLNiUOQs53Oyy78EQyr2bu+//uoskbuoucenUUHM5I11M15yq1XuBJ26fIK1Jatza9pOGJNI8+4dSMWZW1GMFqgOZTKXv4kZFqU915/L1gsfS2bljB8pD1Qoq68ieGCQ49vBSFOWP24gtWBfKVJqU3HGHJgA5Ia/ujW3e37jr20xGqaBEcTjgin2fjm7VTao+hOOAMf47YkZNTEuLEHVPbDZM2tCCSlUdLpdyPB6mzX7XVmRxO26mtaHEeecivtaS6xXJXmns7OkntOzwgJi46B5uMgZz42UZ9qy1fCq8yCOyADb/Hu2WaJm7MIehHVhdC/siRzUUSOJ4N9gOPaFFAy5D28sDEa/IvlVriOwXirmDdPSlkTpwZ1NiisZXdZMaK6CWroaCHv9hYrJ7wKcntLQjLnnnskcyqxIVC7uEdlKHyLTNziyxol6oU/2Ym1NDoYWPDzcIeCkCr+xBapLXTVcg60YvcL/h+6wy5rp1v2h9R5B8HCCvmyc2X/FyaAmi8P7DYYHQL8+g+B0nGmzrrSGJzsEL7vChyiKfeNG7nnJKrU1+V8/+bPGsuPOK1XDTx80Uq56EzjHUPXy59zqtYL7ZZAIL0BQPxgm43yUCJfYSIKiwB9Odu+vb2DLDk5CLi45OHh2K7yi9m/lxlXla945az5OYO2l7a5m7rWF8="
cache:
directories:
- "$RUSTUP_HOME"
- $CARGO_HOME/registry/index/
- $CARGO_HOME/registry/cache/
- prebuilt/mac
- prebuilt/linux64
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
- third_party/v8/buildtools/mac/
- third_party/v8/buildtools/linux64/
- third_party/v8/third_party/llvm-build/
install:
# Because prebuilt/ is cached, we need to manually reset changes that might
# happen to the sha1 files here.
- git checkout -- prebuilt
- nvm install v10
- nvm use --delete-prefix v10
- node -v
- |-
# Install Rust.
if [ ! $(rustc --version | grep $RUST_VERSION) ]; then
curl -sSf https://sh.rustup.rs | sh -s -- -y \
--default-toolchain $RUST_VERSION
rustup default $RUST_VERSION
fi
rustc --version
cargo --version
- |-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export PATH="`pwd`/prebuilt/mac:$PATH"
else
export PATH="`pwd`/prebuilt/linux64:$PATH"
fi
- |-
# 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:
- ./tools/setup.py
# Start sccache, then throw away the S3 access key.
- |-
sccache --start-server
unset AWS_SECRET_ACCESS_KEY
- set -e
# Default script for release builds.
script:
- ./tools/lint.py
- ./tools/test_format.py
- ./tools/build.py -C target/release
- DENO_BUILD_MODE=release ./tools/test.py
jobs:
fast_finish: true
include:
- name: "gn release mac x86_64"
os: osx
after_success:
- &gzip_release
gzip -c target/release/deno > target/release/deno_${TRAVIS_OS_NAME}_x64.gz
deploy:
- &release_provider
provider: releases
api_key: &github-token
secure: RIwv515oDcPAlEvt7uG8FeSFi6Tz6ODJUOXcFj6FYUPszxJ7Cg1kBLKln+fNW5OeOc52VsaZb/vPZ85skyEM6zk2ijL9FcSnnfNEm548w77iH6G0sk09NgBTy6KRXES6NZHD9jN1YTWYkT2G1NQi7mLqxR8a8pnWTbeK5HhtSWGsZPtXqf5iQbvnWsmKA0/w+FIgKupU0xe/qsYjh0eMLYpZDUWoKO0VxBKJ/ix5Uz91aJTjMIcHHij+ALg4pk+FkDotdyx39XB9b25KDxGuaI7NxWjSPzDxs/ZBHP6QYDLO0ti93ftvLAxRoBKPFoZrXqAu3KG9anr9WvxE40DO9OdV0VX2ZUatMUQm3DpSheN8ml2sErFqjIInqlpkdOVDYORz7FikPxkb9DKt+iuyFfxPRa4YWJv2tg8+Hy/nRCQw69OoKqrSNJ8KJDB3OjYbRBtdHz79RLJhTsGZla6RiyXfM7crR7CbFjbwdbW3Pt60t24fhvXQ0SwR0QTgzS/ieYEQHq/9GtSQA/Tn4kdIkyN6BdOMrQd/aUtgKmNdqbSlfmWGNyNZIxHdB+3RrTNT1tagkRI4UHEUfEujpIdYKwLjv0Xmi/VtTM+zOSkzHsIWGPfHBmIGnXfAItUHqivQYJ15E+dzg3T1CEbBxkDQtvwien9Fa8/pBsMkyovl8ps=
file: "target/release/deno_${TRAVIS_OS_NAME}_x64.gz"
on:
tags: true
repo: denoland/deno
skip-cleanup: true
- name: "gn release linux x86_64"
os: linux
after_success:
- *gzip_release
- ./tools/benchmark.py target/release && cp -r website/* gh-pages/
deploy:
- *release_provider
# Run benchmarks and publish the result to github pages.
- provider: pages
github-token: *github-token
keep-history: true
local-dir: gh-pages
on:
branch: master
repo: denoland/deno
skip-cleanup: true
- name: "cargo release linux arm64"
os: linux
dist: xenial
script:
- ./tools/lint.py
- ./tools/test_format.py
- rustup target add aarch64-unknown-linux-gnu
- sudo apt update
- |-
sudo apt -yq --no-install-suggests --no-install-recommends install \
g++-5-aarch64-linux-gnu gcc-5-aarch64-linux-gnu g++-5-multilib \
libc6-arm64-cross
- build/linux/sysroot_scripts/install-sysroot.py --arch=arm64
- export DENO_BUILD_ARGS="target_cpu=\"arm64\" v8_target_cpu=\"arm64\""
- export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="/usr/bin/aarch64-linux-gnu-gcc-5"
- export CC_aarch64_unknown_linux_gnu="/usr/bin/aarch64-linux-gnu-gcc-5"
- cargo build -vv --target=aarch64-unknown-linux-gnu --release --locked
- cargo build -vv --target=aarch64-unknown-linux-gnu --release --tests --locked
- sudo apt -yq install qemu qemu-user binfmt-support qemu-user-binfmt
- sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib/ld-linux-aarch64.so.1
- export QEMU_LD_PREFIX=/usr/aarch64-linux-gnu
#- $CARGO_TARGET_DIR/aarch64-unknown-linux-gnu/release/deno tests/002_hello.ts
# - DENO_BUILD_MODE=release ./tools/test.py $CARGO_TARGET_DIR/aarch64-unknown-linux-gnu/release TODO(afinch7): Get the tests working
- name: "cargo release linux x86_64"
os: linux
script:
- ./tools/lint.py
- ./tools/test_format.py
- cargo build -vv --release --locked
# LSAN: We are in the process of getting a completely clean LSAN build,
# but it will take some work. So for now we just run a subset of the
# tests. We want to detect leaks during the build process as well as
# when executing the tests. So set the ASAN_OPTIONS env var before
# build.py is run.
- name: "lsan debug linux"
os: linux
script:
- ./tools/lint.py
- ./tools/test_format.py
- echo is_asan=true >> target/debug/args.gn
- echo is_lsan=true >> target/debug/args.gn
# Call gn gen again to make sure new args are recognized.
- third_party/depot_tools/gn gen target/debug
- export ASAN_OPTIONS=detect_leaks=1
- ./tools/build.py test_cc
- ./target/debug/test_cc