2018-05-29 01:35:06 -04:00
|
|
|
language: c++
|
2018-06-19 12:54:24 +02:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
2018-05-29 03:09:49 -04:00
|
|
|
cache:
|
2018-05-29 05:08:11 -04:00
|
|
|
ccache: true
|
2018-05-29 03:09:49 -04:00
|
|
|
directories:
|
2018-06-19 12:54:24 +02:00
|
|
|
- $DEPOT_TOOLS_PATH
|
|
|
|
- $BUILD_PATH
|
2018-05-23 14:29:14 -04:00
|
|
|
env:
|
|
|
|
global:
|
2018-06-19 12:54:24 +02:00
|
|
|
- BUILD_PATH=$HOME/out/Default
|
|
|
|
- DEPOT_TOOLS_PATH=$HOME/depot_tools
|
2018-05-23 14:29:14 -04:00
|
|
|
before_install: |
|
2018-06-19 12:54:24 +02:00
|
|
|
if ! [ -x $DEPOT_TOOLS_PATH/gclient ]; then
|
|
|
|
rm -rf $DEPOT_TOOLS_PATH
|
|
|
|
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS_PATH
|
2018-05-23 14:29:14 -04:00
|
|
|
fi
|
2018-05-14 03:06:09 -04:00
|
|
|
install:
|
2018-06-19 12:54:24 +02:00
|
|
|
- export PATH=$PATH:$DEPOT_TOOLS_PATH
|
|
|
|
# Sync dependencies.
|
|
|
|
# TODO(ry) These sync steps are very terrible and only here temporarily.
|
2018-07-24 13:42:23 -04:00
|
|
|
# rustc should be added to deno_third_party. Ultimately Deno *should not*
|
|
|
|
# depend on yarn, gclient, rustup, cargo, nor any internet connection.
|
2018-06-19 12:54:24 +02:00
|
|
|
- curl -sSf https://sh.rustup.rs | sh -s -- -y
|
|
|
|
- export PATH=$HOME/.cargo/bin:$PATH
|
|
|
|
- rustc --version
|
2018-07-13 03:24:07 -04:00
|
|
|
# TODO(ry) Do not depend on run_hooks because it calls
|
|
|
|
# //third_party/depot_tools/download_from_google_storage.py
|
2018-07-24 13:42:23 -04:00
|
|
|
# Use git lfs and combine run_hooks with sync_third_party?
|
2018-07-13 03:24:07 -04:00
|
|
|
- ./tools/run_hooks.py
|
2018-06-19 12:54:24 +02:00
|
|
|
# ccache needs the custom LLVM to be in PATH and other variables.
|
|
|
|
- export PATH=`pwd`/third_party/llvm-build/Release+Asserts/bin:$PATH
|
|
|
|
- export CCACHE_CPP2=yes
|
|
|
|
- export CCACHE_SLOPPINESS=time_macros
|
2018-07-24 13:42:23 -04:00
|
|
|
- ccache -s
|
2018-06-19 12:54:24 +02:00
|
|
|
# is_debug, use_allocator, and ccache are used to speed travis.
|
|
|
|
# use_custom_libcxx=false and use_sysroot=false seem to be required to build on
|
|
|
|
# Ubuntu 14.04
|
2018-07-24 13:42:23 -04:00
|
|
|
- ./tools/build.py --build_path=$BUILD_PATH --args='is_debug=false use_allocator="none" use_custom_libcxx=false use_sysroot=false'
|
2018-05-14 03:06:09 -04:00
|
|
|
script:
|
2018-07-08 02:24:29 -04:00
|
|
|
- ./tools/lint.py
|
2018-07-21 19:08:24 -04:00
|
|
|
- ./tools/test.py $BUILD_PATH
|