2018-05-29 01:35:06 -04:00
|
|
|
language: c++
|
2018-09-22 02:50:28 -04:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
2018-09-22 02:58:31 -04:00
|
|
|
env: BENCHMARK=1
|
2018-09-24 18:12:52 -04:00
|
|
|
sudo: required
|
2018-09-22 02:50:28 -04:00
|
|
|
- os: osx
|
2018-05-23 14:29:14 -04:00
|
|
|
env:
|
|
|
|
global:
|
2018-08-21 08:42:23 -04:00
|
|
|
- CARGO_PATH=$HOME/.cargo/
|
|
|
|
- RUSTUP_PATH=$HOME/.rustup/
|
2018-09-24 17:31:52 -04:00
|
|
|
- HOMEBREW_PATH=$HOME/homebrew/
|
2018-08-21 08:42:23 -04:00
|
|
|
- DENO_BUILD_ARGS="use_custom_libcxx=false use_sysroot=false"
|
|
|
|
- DENO_BUILD_PATH=$HOME/out/Default
|
|
|
|
- DENO_BUILD_MODE=release
|
|
|
|
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_PATH/bin:$PATH
|
|
|
|
- CCACHE_CPP2=yes
|
|
|
|
- CCACHE_SLOPPINESS=time_macros
|
2018-08-17 11:54:36 -04:00
|
|
|
cache:
|
|
|
|
ccache: true
|
|
|
|
directories:
|
2018-08-21 08:42:23 -04:00
|
|
|
- "$CARGO_PATH"
|
|
|
|
- "$RUSTUP_PATH"
|
2018-09-24 17:31:52 -04:00
|
|
|
- "$HOMEBREW_PATH"
|
2018-08-21 08:42:23 -04:00
|
|
|
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
|
|
|
- third_party/v8/third_party/llvm-build/
|
2018-09-22 02:50:28 -04:00
|
|
|
install:
|
2018-09-24 17:31:52 -04:00
|
|
|
- |-
|
|
|
|
# OS X: install a private copy of homebrew.
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
export BREW="${HOMEBREW_PATH}bin/brew"
|
|
|
|
export PATH="${HOMEBREW_PATH}bin:$PATH"
|
|
|
|
if [[ ! -x "$BREW" ]]; then
|
|
|
|
git clone git://github.com/homebrew/brew "$HOMEBREW_PATH"
|
|
|
|
fi
|
|
|
|
"$BREW" --version
|
|
|
|
fi
|
|
|
|
- |-
|
|
|
|
# Install ccache (if necessary) and set it up.
|
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" && ! $(which ccache) ]]; then
|
|
|
|
"$BREW" install ccache
|
|
|
|
fi
|
|
|
|
ccache --version | head -n 1
|
|
|
|
ccache --max-size=1G --show-stats
|
2018-09-22 02:50:28 -04:00
|
|
|
- |-
|
2018-08-01 19:58:11 -04:00
|
|
|
# Install Rust.
|
2018-09-22 02:50:28 -04:00
|
|
|
# TODO(ry) Include rustc in third_party.
|
|
|
|
# https://github.com/denoland/deno/issues/386
|
|
|
|
if [ ! $(which rustc) ]; then
|
2018-08-01 19:58:11 -04:00
|
|
|
curl -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
fi
|
2018-09-22 02:50:28 -04:00
|
|
|
rustc --version
|
|
|
|
cargo --version
|
2018-09-22 02:58:31 -04:00
|
|
|
- |-
|
|
|
|
# Install Hyperfine (if benchmarking is enabled for this build).
|
|
|
|
if [ $BENCHMARK ]; then
|
|
|
|
if [ ! $(which hyperfine) ]; then
|
|
|
|
cargo install hyperfine
|
|
|
|
fi
|
|
|
|
hyperfine --version
|
|
|
|
fi
|
2018-08-17 11:54:36 -04:00
|
|
|
before_script:
|
2018-09-22 02:50:28 -04:00
|
|
|
- ./tools/setup.py
|
2018-05-14 03:06:09 -04:00
|
|
|
script:
|
2018-09-22 02:50:28 -04:00
|
|
|
- ./tools/lint.py
|
2018-08-24 11:37:59 -04:00
|
|
|
- bash -c "sleep 2100; pkill ninja" &
|
2018-09-22 02:50:28 -04:00
|
|
|
- ./tools/build.py -j2
|
|
|
|
- ./tools/test.py $DENO_BUILD_PATH
|
|
|
|
after_success:
|
|
|
|
- |
|
|
|
|
# Run benchmarks and publish the result to github pages.
|
|
|
|
if [ $BENCHMARK ]; then
|
|
|
|
./tools/benchmark.py $DENO_BUILD_PATH &&
|
|
|
|
cp -r website/* gh-pages/
|
|
|
|
fi
|
|
|
|
before_deploy:
|
|
|
|
- gzip -c $DENO_BUILD_PATH/deno > $DENO_BUILD_PATH/deno_${TRAVIS_OS_NAME}_x64.gz
|
2018-08-21 08:42:23 -04:00
|
|
|
deploy:
|
2018-09-22 02:50:28 -04:00
|
|
|
- provider: releases
|
2018-09-22 02:58:31 -04:00
|
|
|
api_key: &github-token
|
2018-08-21 08:42:23 -04:00
|
|
|
secure: RIwv515oDcPAlEvt7uG8FeSFi6Tz6ODJUOXcFj6FYUPszxJ7Cg1kBLKln+fNW5OeOc52VsaZb/vPZ85skyEM6zk2ijL9FcSnnfNEm548w77iH6G0sk09NgBTy6KRXES6NZHD9jN1YTWYkT2G1NQi7mLqxR8a8pnWTbeK5HhtSWGsZPtXqf5iQbvnWsmKA0/w+FIgKupU0xe/qsYjh0eMLYpZDUWoKO0VxBKJ/ix5Uz91aJTjMIcHHij+ALg4pk+FkDotdyx39XB9b25KDxGuaI7NxWjSPzDxs/ZBHP6QYDLO0ti93ftvLAxRoBKPFoZrXqAu3KG9anr9WvxE40DO9OdV0VX2ZUatMUQm3DpSheN8ml2sErFqjIInqlpkdOVDYORz7FikPxkb9DKt+iuyFfxPRa4YWJv2tg8+Hy/nRCQw69OoKqrSNJ8KJDB3OjYbRBtdHz79RLJhTsGZla6RiyXfM7crR7CbFjbwdbW3Pt60t24fhvXQ0SwR0QTgzS/ieYEQHq/9GtSQA/Tn4kdIkyN6BdOMrQd/aUtgKmNdqbSlfmWGNyNZIxHdB+3RrTNT1tagkRI4UHEUfEujpIdYKwLjv0Xmi/VtTM+zOSkzHsIWGPfHBmIGnXfAItUHqivQYJ15E+dzg3T1CEbBxkDQtvwien9Fa8/pBsMkyovl8ps=
|
2018-08-23 00:32:23 -04:00
|
|
|
file: "$DENO_BUILD_PATH/deno_${TRAVIS_OS_NAME}_x64.gz"
|
2018-08-21 08:42:23 -04:00
|
|
|
on:
|
|
|
|
tags: true
|
|
|
|
repo: denoland/deno
|
2018-09-22 02:50:28 -04:00
|
|
|
skip-cleanup: true
|
2018-09-22 02:58:31 -04:00
|
|
|
- provider: pages
|
|
|
|
github-token: *github-token
|
|
|
|
keep-history: true
|
|
|
|
local-dir: gh-pages
|
|
|
|
on:
|
|
|
|
branch: master
|
2018-09-22 06:10:14 -04:00
|
|
|
condition: $BENCHMARK == 1
|
2018-09-22 02:58:31 -04:00
|
|
|
repo: denoland/deno
|
|
|
|
skip-cleanup: true
|