mirror of
https://github.com/denoland/deno.git
synced 2024-12-22 07:14:47 -05:00
Travis: publish from CI (#501)
Split travis build into stages, add release stage.
This commit is contained in:
parent
e41ee9bf4c
commit
87a061785e
1 changed files with 48 additions and 20 deletions
68
.travis.yml
68
.travis.yml
|
@ -1,14 +1,9 @@
|
|||
language: c++
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
cache:
|
||||
ccache: true
|
||||
directories:
|
||||
- $CARGO_PATH
|
||||
- $RUSTUP_PATH
|
||||
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
||||
- third_party/v8/third_party/llvm-build/
|
||||
|
||||
env:
|
||||
global:
|
||||
- CARGO_PATH=$HOME/.cargo/
|
||||
|
@ -20,23 +15,56 @@ env:
|
|||
- DENO_BUILD_ARGS="is_debug=false use_allocator=\"none\" use_custom_libcxx=false use_sysroot=false"
|
||||
- DENO_BUILD_PATH=$HOME/out/Default
|
||||
- DENO_BUILD_MODE=debug
|
||||
before_install: |
|
||||
# ccache needs the custom LLVM to be in PATH and other variables.
|
||||
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_PATH/bin:$PATH
|
||||
- CCACHE_CPP2=yes
|
||||
- CCACHE_SLOPPINESS=time_macros
|
||||
|
||||
cache:
|
||||
ccache: true
|
||||
directories:
|
||||
- $CARGO_PATH
|
||||
- $RUSTUP_PATH
|
||||
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
||||
- third_party/v8/third_party/llvm-build/
|
||||
|
||||
install: |
|
||||
# Install Rust.
|
||||
# TODO(ry) Include rustc in third_party https://github.com/denoland/deno/issues/386
|
||||
export PATH=$CARGO_PATH/bin:$PATH
|
||||
rustc --version
|
||||
if [ $? != 0 ]; then
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
fi
|
||||
install:
|
||||
# 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
|
||||
- ccache -s
|
||||
- ./tools/setup.py
|
||||
# Travis hangs without -j2 argument to ninja.
|
||||
- ./tools/build.py -j2
|
||||
before_script:
|
||||
- ccache -s
|
||||
- ./tools/setup.py
|
||||
script:
|
||||
- ./tools/lint.py
|
||||
- ./tools/test.py $DENO_BUILD_PATH
|
||||
- ./tools/lint.py
|
||||
- ./tools/build.py -j2
|
||||
- ./tools/test.py $DENO_BUILD_PATH
|
||||
|
||||
jobs:
|
||||
include:
|
||||
- stage: test
|
||||
|
||||
- stage: release
|
||||
if: tag IS present
|
||||
script: |
|
||||
# build release binary
|
||||
env DENO_BUILD_ARGS="use_custom_libcxx=false use_sysroot=false" \
|
||||
DENO_BUILD_MODE=release \
|
||||
./tools/build.py -j2
|
||||
# test release binary
|
||||
env DENO_BUILD_MODE=release ./tools/tests.py
|
||||
before_deploy: |
|
||||
# gzip and name release to denote platform
|
||||
gzip -c $DENO_BUILD_PATH/deno > $DENO_BUILD_PATH/deno_linux_x64.gz
|
||||
deploy:
|
||||
provider: releases
|
||||
skip_cleanup: true
|
||||
api_key:
|
||||
secure: nm/XSUqQkucsgrTqHhZvVzzGrNsiagQyvy4ozqIcuI9BIENJ7upV2HKy0q+lE0j3iwTLXEVFEQ40hnG166nVTgVjIpxoGcVZvMTqAQFus9gVzbA71fAfAQL+nVlIRsdrSJOvsz1BHLKUgZ7UwyciApduaBDgm+mwXtMty5SHDotTc6mX4bz4UceMG4W7WXFcrWwWz+oFz9r8rYW1aKXcCQOms8eshbCtA3LzJtzUIN9NCE+bWf7QGRtz65aKy26MA/mTEAivQQ/J3ueXn4BzulpATHaSwOy5bvc2HGq5YjVJk1RQI7wqr4ONAtFWyMNAxB4JJ+g1XcN6oscoelpQgVWM2GxEblOZ+HSZAhpYiUuCQiKVe4eF238VQpn0BKw1dPEj1UWf5DHUMdcDFxeBfv1vIge5qhb+fpJTGKXfy91+DlwzM+JMBwqkXnuPFoPbh1lDLDKWB8UPGt07o+Y6tdZytr82kCoMaaHFqAVXYb0iBvG0Bw3WfzpwUsURGU08rw1pFnofnC74IyHGbcJ/+u39GzWTlCNGKce7OgEn16MzGe8QzpVmnO5+WX/uBhDHUyvDZkZHGZWHi19gQaUqDlZ4F3lSe4LMgpjEN23Ovv4AWT8bD2lbVr0XhsMlrcMw5n+RhjNDgadDw3dV9F2MHlZBpp1kYNaVqDkv5nIltYA=
|
||||
file: "$DENO_BUILD_PATH/deno_linux_x64.gz"
|
||||
on:
|
||||
tags: true
|
||||
repo: denoland/deno
|
||||
|
|
Loading…
Reference in a new issue