summaryrefslogtreecommitdiff
path: root/.travis.yml
blob: d6a947810abe718523bc456073a003b6475ee6e6 (plain)
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
language: c++
branches:
  only:
  - master
cache:
  ccache: true
  directories:
   - js/node_modules/
   - $DEPOT_TOOLS_PATH
   - $BUILD_PATH
env:
  global:
    - BUILD_PATH=$HOME/out/Default
    - DEPOT_TOOLS_PATH=$HOME/depot_tools
before_install: |
  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
  fi
install:
 - export PATH=$PATH:$DEPOT_TOOLS_PATH
 # Sync dependencies.
 # TODO(ry) These sync steps are very terrible and only here temporarily.
 # A single deno_deps git submodule should be created which contains V8,
 # node_modules, depot_tools, rustc, and other deps.
 # Building Deno *should not* depend on yarn, gclient, rustup, cargo, nor any
 # internet connection.
 - curl -sSf https://sh.rustup.rs | sh -s -- -y
 - export PATH=$HOME/.cargo/bin:$PATH
 - rustc --version
 - (cd js; yarn)
 - gclient sync -j2 --no-history
 # 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
 # In case gn gen args change, delete args.gn to avoid using cached values.
 - rm -f $BUILD_PATH/args.gn
 # 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
 - gn gen $BUILD_PATH --args='is_debug=false use_allocator="none" cc_wrapper="ccache" use_custom_libcxx=false use_sysroot=false'
 - gn args $BUILD_PATH --list
 - ccache -s
 # Travis hangs without -j2 argument to ninja.
 - ninja -j2 -C $BUILD_PATH mock_runtime_test mock_main
 - ninja -j2 -C $BUILD_PATH deno
script:
 - $BUILD_PATH/mock_runtime_test
 - $BUILD_PATH/mock_main foo bar
 - $BUILD_PATH/deno meow