mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
Parallelize travis
Splits into 4 jobs: gn linux, gn mac, cargo linux, LSAN linux.
This commit is contained in:
parent
ec76fbccb8
commit
105a5193b5
1 changed files with 67 additions and 58 deletions
125
.travis.yml
125
.travis.yml
|
@ -1,11 +1,8 @@
|
||||||
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
# Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
||||||
|
sudo: false
|
||||||
language: c++
|
language: c++
|
||||||
matrix:
|
git:
|
||||||
include:
|
depth: 1
|
||||||
- os: linux
|
|
||||||
env: BENCHMARK=1
|
|
||||||
sudo: required
|
|
||||||
- os: osx
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
|
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
|
||||||
|
@ -26,6 +23,7 @@ cache:
|
||||||
- prebuilt/
|
- prebuilt/
|
||||||
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
||||||
- third_party/v8/third_party/llvm-build/
|
- third_party/v8/third_party/llvm-build/
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- nvm install v8
|
- nvm install v8
|
||||||
- nvm use --delete-prefix v8
|
- nvm use --delete-prefix v8
|
||||||
|
@ -53,66 +51,77 @@ install:
|
||||||
rm -rf "$RUSTUP_HOME"tmp
|
rm -rf "$RUSTUP_HOME"tmp
|
||||||
rm -rf "$RUSTUP_HOME"toolchains/*/etc
|
rm -rf "$RUSTUP_HOME"toolchains/*/etc
|
||||||
rm -rf "$RUSTUP_HOME"toolchains/*/share
|
rm -rf "$RUSTUP_HOME"toolchains/*/share
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- ./tools/setup.py
|
- ./tools/setup.py
|
||||||
# Start sccache, then throw away the S3 access key.
|
# Start sccache, then throw away the S3 access key.
|
||||||
- |-
|
- |-
|
||||||
sccache --start-server
|
sccache --start-server
|
||||||
unset AWS_SECRET_ACCESS_KEY
|
unset AWS_SECRET_ACCESS_KEY
|
||||||
script:
|
|
||||||
- |-
|
# Default script for release builds.
|
||||||
# Check lint and format.
|
script: |-
|
||||||
set -e # Fail immediately if any of the following fail.
|
|
||||||
./tools/lint.py
|
./tools/lint.py
|
||||||
./tools/test_format.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
|
|
||||||
|
|
||||||
- |-
|
|
||||||
# Build deno.exe with Cargo first. Both builds write their output to the same
|
|
||||||
# directory. We want the final one (which gets tested and released) to be
|
|
||||||
# built by Ninja.
|
|
||||||
cargo build --release -vv -j2
|
|
||||||
|
|
||||||
- |-
|
|
||||||
# Release build and test
|
|
||||||
./tools/build.py -C target/release -j2
|
./tools/build.py -C target/release -j2
|
||||||
DENO_BUILD_MODE=release ./tools/test.py
|
DENO_BUILD_MODE=release ./tools/test.py
|
||||||
|
|
||||||
- sccache --stop-server
|
jobs:
|
||||||
after_success:
|
fast_finish: true
|
||||||
- |
|
include:
|
||||||
# Run benchmarks and publish the result to github pages.
|
- name: "gn release mac"
|
||||||
if [ $BENCHMARK ]; then
|
os: osx
|
||||||
./tools/benchmark.py target/release &&
|
after_success:
|
||||||
cp -r website/* gh-pages/
|
- &gzip_release
|
||||||
fi
|
gzip -c target/release/deno > target/release/deno_${TRAVIS_OS_NAME}_x64.gz
|
||||||
before_deploy:
|
deploy:
|
||||||
- gzip -c target/release/deno > target/release/deno_${TRAVIS_OS_NAME}_x64.gz
|
- &release_provider
|
||||||
deploy:
|
provider: releases
|
||||||
- provider: releases
|
script:
|
||||||
api_key: &github-token
|
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=
|
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"
|
file: "target/release/deno_${TRAVIS_OS_NAME}_x64.gz"
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
repo: denoland/deno
|
repo: denoland/deno
|
||||||
skip-cleanup: true
|
skip-cleanup: true
|
||||||
- provider: pages
|
|
||||||
github-token: *github-token
|
- name: "gn release linux"
|
||||||
keep-history: true
|
os: linux
|
||||||
local-dir: gh-pages
|
after_success:
|
||||||
on:
|
- *gzip_release
|
||||||
branch: master
|
- ./tools/benchmark.py target/release && cp -r website/* gh-pages/
|
||||||
condition: $BENCHMARK == 1
|
deploy:
|
||||||
repo: denoland/deno
|
- *release_provider
|
||||||
skip-cleanup: true
|
# Run benchmarks and publish the result to github pages.
|
||||||
|
- provider: pages
|
||||||
|
github-token: *github-token
|
||||||
|
keep-history: true
|
||||||
|
local-dir: gh-pages
|
||||||
|
on:
|
||||||
|
branch: master
|
||||||
|
repo: denoland/deno
|
||||||
|
skip-cleanup: true
|
||||||
|
|
||||||
|
- name: "cargo release linux"
|
||||||
|
os: linux
|
||||||
|
script:
|
||||||
|
- cargo build -vv --release -j2
|
||||||
|
|
||||||
|
# LSAN: 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. 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.
|
||||||
|
- name: "lsan debug linux"
|
||||||
|
os: linux
|
||||||
|
script:
|
||||||
|
- |-
|
||||||
|
echo is_asan=true >> target/debug/args.gn
|
||||||
|
echo is_lsan=true >> target/debug/args.gn
|
||||||
|
# Call gn gen again to make sure new args are recognized.
|
||||||
|
third_party/depot_tools/gn gen target/debug
|
||||||
|
export ASAN_OPTIONS=detect_leaks=1
|
||||||
|
./tools/build.py test_cc -j2
|
||||||
|
./target/debug/test_cc
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue