mirror of
https://github.com/denoland/deno.git
synced 2024-10-31 09:14:20 -04:00
106 lines
4.3 KiB
YAML
106 lines
4.3 KiB
YAML
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
|
language: c++
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
env: BENCHMARK=1
|
|
sudo: required
|
|
- os: osx
|
|
env:
|
|
global:
|
|
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
|
|
- RUSTUP_HOME=$HOME/.rustup/
|
|
- RUST_BACKTRACE=1
|
|
- CARGO_TARGET_DIR=$HOME/target
|
|
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_HOME/bin:$PATH
|
|
- RUSTC_WRAPPER=sccache
|
|
- SCCACHE_BUCKET=deno-sccache
|
|
- AWS_ACCESS_KEY_ID=AKIAIPOYFUDOPCMWRVZA
|
|
# AWS_SECRET_ACCESS_KEY=...
|
|
- secure: "hlQoMNDWgsdFPDAIwE4VCr21w6ftD8BGLNE8w23+9wCqMs8TXCGzdzpTYzSePmToUfF1WjGQTF3advifzg7pdrUp41ThWzRkEjiRoXEORkKFuZENgLdi4ZZsvOYIfX5dfTcw7wkLEuGkywy1D9s/4uJydiVqYYM3fWI7U2ax8+wpenRH59moUeHqGGzPk8Hy4wcD7SoP+fvuOYJ+KjU2urbddwrVus9jnmXbx0Srq/L/ayBr0aLpZXcYZ3nSMnXpc9mo3YuVZQR42+ARHI5R7V1wrCa/025/O4kpSry/bipyN7Oyry/WY+9Hu3EDdlIUosJsWVHhv5s8ZuZWJG/0VITUP+MnDexGNkbbbDzzwk/7dDhTo1DRpT7fmSFVzr6J9bw4JEU9k//znLuCOnRLoWagysQUVUZQXDh7TTfMmGP0wdsUggfr8azrkZF3hjg+g+aOlz0ZpVtYQ8hdhvLQRp4pmxyQlsKygf0fFXWJvAp40KXIkrKXJ6hXIGdfWirZ3dgc8rCgVdOKi6Hy39EKOiIdP3j2J2tv3NTPkUi7z+BaDc5cPCaarR8ZvLLkv1lvYTFap/fk+TXpM3AS0hs1o91fyJ0l/P0KKTp7V8MoNC7iXhzCK/InNgpcs0rK7w7QOlEHihRlY3Ya4m3KvSRbL/P55TneX5xwr6yP719ARs4="
|
|
cache:
|
|
directories:
|
|
- "$RUSTUP_HOME"
|
|
- $CARGO_HOME/registry/index/
|
|
- $CARGO_HOME/registry/cache/
|
|
- prebuilt/
|
|
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
|
- third_party/v8/third_party/llvm-build/
|
|
install:
|
|
- nvm install v8
|
|
- nvm use --delete-prefix v8
|
|
- node -v
|
|
- |-
|
|
# Install Rust.
|
|
# TODO(ry) Include rustc in third_party.
|
|
# https://github.com/denoland/deno/issues/386
|
|
if [ ! $(rustc --version | grep 1.30.0) ]; then
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.30.0
|
|
rustup default 1.30.0
|
|
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
|
|
script:
|
|
- |-
|
|
# Check lint and format.
|
|
set -e # Fail immediately if any of the following fail.
|
|
./tools/lint.py
|
|
./tools/test_format.py
|
|
|
|
- |-
|
|
# LSAN build. 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.
|
|
echo is_asan=true >> target/debug/args.gn
|
|
echo is_lsan=true >> target/debug/args.gn
|
|
# 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.
|
|
export ASAN_OPTIONS=detect_leaks=1
|
|
./tools/build.py -C target/debug -j2 test_cc
|
|
./target/debug/test_cc
|
|
|
|
- |-
|
|
# Release build and test
|
|
./tools/build.py -C target/release -j2
|
|
DENO_BUILD_MODE=release ./tools/test.py
|
|
|
|
- |-
|
|
# Cargo check
|
|
cargo build --release -vv -j2
|
|
|
|
before_deploy:
|
|
- gzip -c target/release/deno > target/release/deno_${TRAVIS_OS_NAME}_x64.gz
|
|
deploy:
|
|
- 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
|
|
# Run benchmarks and publish the result to github pages.
|
|
- provider: pages
|
|
script: ./tools/benchmark.py target/release && cp -r website/* gh-pages/
|
|
github-token: *github-token
|
|
keep-history: true
|
|
local-dir: gh-pages
|
|
on:
|
|
branch: master
|
|
condition: $BENCHMARK == 1
|
|
repo: denoland/deno
|
|
skip-cleanup: true
|