2019-01-24 10:54:43 -05:00
|
|
|
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
2018-12-19 04:37:04 -05:00
|
|
|
sudo: false
|
2018-05-29 01:35:06 -04:00
|
|
|
language: c++
|
2018-12-19 04:37:04 -05:00
|
|
|
git:
|
|
|
|
depth: 1
|
2018-05-23 14:29:14 -04:00
|
|
|
env:
|
|
|
|
global:
|
2019-05-02 23:44:28 -04:00
|
|
|
- RUST_VERSION=1.34.1
|
2018-12-18 21:09:30 -05:00
|
|
|
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
|
2018-09-26 01:50:08 -04:00
|
|
|
- RUSTUP_HOME=$HOME/.rustup/
|
2019-01-02 11:39:26 -05:00
|
|
|
- RUST_BACKTRACE=full
|
2018-11-01 01:06:55 -04:00
|
|
|
- CARGO_TARGET_DIR=$HOME/target
|
2018-09-26 01:50:08 -04:00
|
|
|
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_HOME/bin:$PATH
|
2019-02-11 12:57:26 -05:00
|
|
|
- PYTHONPATH=third_party/python_packages
|
2018-12-18 03:00:19 -05:00
|
|
|
- RUSTC_WRAPPER=sccache
|
|
|
|
- SCCACHE_BUCKET=deno-sccache
|
2018-12-19 13:40:44 -05:00
|
|
|
- AWS_ACCESS_KEY_ID=AKIAIVRN52PLDBP55LBQ
|
2018-12-18 03:00:19 -05:00
|
|
|
# AWS_SECRET_ACCESS_KEY=...
|
2018-12-19 13:40:44 -05:00
|
|
|
- secure: "ugSLNiUOQs53Oyy78EQyr2bu+//uoskbuoucenUUHM5I11M15yq1XuBJ26fIK1Jatza9pOGJNI8+4dSMWZW1GMFqgOZTKXv4kZFqU915/L1gsfS2bljB8pD1Qoq68ieGCQ49vBSFOWP24gtWBfKVJqU3HGHJgA5Ia/ujW3e37jr20xGqaBEcTjgin2fjm7VTao+hOOAMf47YkZNTEuLEHVPbDZM2tCCSlUdLpdyPB6mzX7XVmRxO26mtaHEeecivtaS6xXJXmns7OkntOzwgJi46B5uMgZz42UZ9qy1fCq8yCOyADb/Hu2WaJm7MIehHVhdC/siRzUUSOJ4N9gOPaFFAy5D28sDEa/IvlVriOwXirmDdPSlkTpwZ1NiisZXdZMaK6CWroaCHv9hYrJ7wKcntLQjLnnnskcyqxIVC7uEdlKHyLTNziyxol6oU/2Ym1NDoYWPDzcIeCkCr+xBapLXTVcg60YvcL/h+6wy5rp1v2h9R5B8HCCvmyc2X/FyaAmi8P7DYYHQL8+g+B0nGmzrrSGJzsEL7vChyiKfeNG7nnJKrU1+V8/+bPGsuPOK1XDTx80Uq56EzjHUPXy59zqtYL7ZZAIL0BQPxgm43yUCJfYSIKiwB9Odu+vb2DLDk5CLi45OHh2K7yi9m/lxlXla945az5OYO2l7a5m7rWF8="
|
2018-08-17 11:54:36 -04:00
|
|
|
cache:
|
|
|
|
directories:
|
2018-09-26 01:50:08 -04:00
|
|
|
- "$RUSTUP_HOME"
|
2018-12-18 21:09:30 -05:00
|
|
|
- $CARGO_HOME/registry/index/
|
|
|
|
- $CARGO_HOME/registry/cache/
|
2019-01-15 12:18:02 -05:00
|
|
|
- prebuilt/mac
|
|
|
|
- prebuilt/linux64
|
2018-08-21 08:42:23 -04:00
|
|
|
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
2019-02-07 16:46:19 -05:00
|
|
|
- third_party/v8/buildtools/mac/
|
|
|
|
- third_party/v8/buildtools/linux64/
|
2018-08-21 08:42:23 -04:00
|
|
|
- third_party/v8/third_party/llvm-build/
|
2018-12-19 04:37:04 -05:00
|
|
|
|
2018-09-22 02:50:28 -04:00
|
|
|
install:
|
2019-01-26 02:49:14 -05:00
|
|
|
# Because prebuilt/ is cached, we need to manually reset changes that might
|
|
|
|
# happen to the sha1 files here.
|
|
|
|
- git checkout -- prebuilt
|
2019-04-24 20:33:53 -04:00
|
|
|
- nvm install v12
|
|
|
|
- nvm use --delete-prefix v12
|
2018-10-11 19:32:57 -04:00
|
|
|
- node -v
|
2018-09-22 02:50:28 -04:00
|
|
|
- |-
|
2018-08-01 19:58:11 -04:00
|
|
|
# Install Rust.
|
2019-03-20 18:55:52 -04:00
|
|
|
if [ ! $(rustc --version | grep $RUST_VERSION) ]; then
|
|
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y \
|
|
|
|
--default-toolchain $RUST_VERSION
|
|
|
|
rustup default $RUST_VERSION
|
2019-05-02 21:29:56 -04:00
|
|
|
rustup component add clippy
|
2018-08-01 19:58:11 -04:00
|
|
|
fi
|
2018-09-22 02:50:28 -04:00
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2018-09-22 02:58:31 -04:00
|
|
|
- |-
|
2018-12-18 21:09:30 -05:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
export PATH="`pwd`/prebuilt/mac:$PATH"
|
|
|
|
else
|
|
|
|
export PATH="`pwd`/prebuilt/linux64:$PATH"
|
2018-09-22 02:58:31 -04:00
|
|
|
fi
|
2018-09-26 01:12:25 -04:00
|
|
|
- |-
|
|
|
|
# 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
|
2018-12-19 04:37:04 -05:00
|
|
|
|
2018-08-17 11:54:36 -04:00
|
|
|
before_script:
|
2018-09-22 02:50:28 -04:00
|
|
|
- ./tools/setup.py
|
2018-12-19 13:34:26 -05:00
|
|
|
# Start sccache, then throw away the S3 access key.
|
|
|
|
- |-
|
|
|
|
sccache --start-server
|
|
|
|
unset AWS_SECRET_ACCESS_KEY
|
2018-12-23 18:15:38 -05:00
|
|
|
- set -e
|
2018-12-19 04:37:04 -05:00
|
|
|
|
|
|
|
# Default script for release builds.
|
2018-12-23 18:15:38 -05:00
|
|
|
script:
|
|
|
|
- ./tools/lint.py
|
2019-01-17 15:09:44 -05:00
|
|
|
- ./tools/test_format.py
|
2019-02-12 15:20:32 -05:00
|
|
|
- ./tools/build.py -C target/release
|
2019-06-08 07:46:57 -04:00
|
|
|
- DENO_BUILD_MODE=release ./tools/test.py
|
2018-12-03 13:30:47 -05:00
|
|
|
|
2018-12-19 04:37:04 -05:00
|
|
|
jobs:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
2019-03-08 13:11:05 -05:00
|
|
|
- name: "gn release mac x86_64"
|
2018-12-19 04:37:04 -05:00
|
|
|
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
|
2018-12-03 13:30:47 -05:00
|
|
|
|
2019-03-08 13:11:05 -05:00
|
|
|
- name: "gn release linux x86_64"
|
2018-12-19 04:37:04 -05:00
|
|
|
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
|
2018-12-19 05:27:15 -05:00
|
|
|
|
2019-03-08 13:11:05 -05:00
|
|
|
- name: "cargo release linux x86_64"
|
2018-12-19 04:37:04 -05:00
|
|
|
os: linux
|
|
|
|
script:
|
2019-03-18 17:01:08 -04:00
|
|
|
- ./tools/lint.py
|
|
|
|
- ./tools/test_format.py
|
2019-01-13 16:32:06 -05:00
|
|
|
- cargo build -vv --release --locked
|
2019-05-02 21:29:56 -04:00
|
|
|
- cargo clippy --all-targets --release --locked -- -D clippy::all
|
|
|
|
|
2018-12-19 04:37:04 -05:00
|
|
|
# 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.
|
2019-05-03 12:54:25 -04:00
|
|
|
- name: "asan/lsan linux"
|
2018-12-19 04:37:04 -05:00
|
|
|
os: linux
|
|
|
|
script:
|
2019-03-18 17:01:08 -04:00
|
|
|
- ./tools/lint.py
|
|
|
|
- ./tools/test_format.py
|
2018-12-23 18:15:38 -05:00
|
|
|
- echo is_asan=true >> target/debug/args.gn
|
|
|
|
- echo is_lsan=true >> target/debug/args.gn
|
2019-05-03 12:54:25 -04:00
|
|
|
# TODO(ry) sccache doesn't support "-Xclang -fdebug-compilation-dir"
|
|
|
|
# Which is enabled for ASAN builds if symbol_level != 0.
|
|
|
|
# https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?l=1087&rcl=573da77f569b41e23527f2952938f492678ab4bb
|
|
|
|
# Ideally we can remove this constraint in the future.
|
|
|
|
- echo symbol_level=0 >> target/debug/args.gn
|
2018-12-23 18:15:38 -05:00
|
|
|
# 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
|
2019-05-01 09:48:56 -04:00
|
|
|
- ./tools/build.py libdeno_test
|
|
|
|
- ./target/debug/libdeno_test
|
2018-12-03 13:30:47 -05:00
|
|
|
|