mirror of
https://github.com/denoland/deno
synced 2024-10-30 02:21:11 +00:00
Improve travis (#2892)
This commit is contained in:
parent
0879992218
commit
5e873bd0da
1 changed files with 25 additions and 34 deletions
59
.travis.yml
59
.travis.yml
|
@ -1,15 +1,14 @@
|
|||
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
|
||||
sudo: false
|
||||
language: c++
|
||||
language: rust
|
||||
rust:
|
||||
- 1.37.0
|
||||
git:
|
||||
depth: 1
|
||||
env:
|
||||
global:
|
||||
- RUST_VERSION=1.37.0
|
||||
- CARGO_HOME=$TRAVIS_BUILD_DIR/third_party/rust_crates/
|
||||
- RUSTUP_HOME=$HOME/.rustup/
|
||||
- RUST_BACKTRACE=full
|
||||
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$CARGO_HOME/bin:$PATH
|
||||
- PATH=$TRAVIS_BUILD_DIR/third_party/llvm-build/Release+Asserts/bin:$PATH
|
||||
- PYTHONPATH=third_party/python_packages
|
||||
- RUSTC_WRAPPER=sccache
|
||||
- SCCACHE_BUCKET=deno-sccache
|
||||
|
@ -17,10 +16,8 @@ env:
|
|||
# AWS_SECRET_ACCESS_KEY=...
|
||||
- secure: "ugSLNiUOQs53Oyy78EQyr2bu+//uoskbuoucenUUHM5I11M15yq1XuBJ26fIK1Jatza9pOGJNI8+4dSMWZW1GMFqgOZTKXv4kZFqU915/L1gsfS2bljB8pD1Qoq68ieGCQ49vBSFOWP24gtWBfKVJqU3HGHJgA5Ia/ujW3e37jr20xGqaBEcTjgin2fjm7VTao+hOOAMf47YkZNTEuLEHVPbDZM2tCCSlUdLpdyPB6mzX7XVmRxO26mtaHEeecivtaS6xXJXmns7OkntOzwgJi46B5uMgZz42UZ9qy1fCq8yCOyADb/Hu2WaJm7MIehHVhdC/siRzUUSOJ4N9gOPaFFAy5D28sDEa/IvlVriOwXirmDdPSlkTpwZ1NiisZXdZMaK6CWroaCHv9hYrJ7wKcntLQjLnnnskcyqxIVC7uEdlKHyLTNziyxol6oU/2Ym1NDoYWPDzcIeCkCr+xBapLXTVcg60YvcL/h+6wy5rp1v2h9R5B8HCCvmyc2X/FyaAmi8P7DYYHQL8+g+B0nGmzrrSGJzsEL7vChyiKfeNG7nnJKrU1+V8/+bPGsuPOK1XDTx80Uq56EzjHUPXy59zqtYL7ZZAIL0BQPxgm43yUCJfYSIKiwB9Odu+vb2DLDk5CLi45OHh2K7yi9m/lxlXla945az5OYO2l7a5m7rWF8="
|
||||
cache:
|
||||
cargo: true
|
||||
directories:
|
||||
- "$RUSTUP_HOME"
|
||||
- $CARGO_HOME/registry/index/
|
||||
- $CARGO_HOME/registry/cache/
|
||||
- prebuilt/mac
|
||||
- prebuilt/linux64
|
||||
- third_party/v8/build/linux/debian_sid_amd64-sysroot/
|
||||
|
@ -35,45 +32,34 @@ install:
|
|||
- nvm install v12
|
||||
- nvm use --delete-prefix v12
|
||||
- node -v
|
||||
- |-
|
||||
# Install Rust.
|
||||
if [ ! $(rustc --version | grep $RUST_VERSION) ]; then
|
||||
curl -sSf https://sh.rustup.rs | sh -s -- -y \
|
||||
--default-toolchain $RUST_VERSION
|
||||
rustup default $RUST_VERSION
|
||||
fi
|
||||
rustup component add clippy
|
||||
rustup component add rustfmt
|
||||
rustc --version
|
||||
cargo --version
|
||||
- rustup component add rustfmt
|
||||
- rustc --version
|
||||
- cargo --version
|
||||
- |-
|
||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||
export PATH="`pwd`/prebuilt/mac:$PATH"
|
||||
else
|
||||
export PATH="`pwd`/prebuilt/linux64:$PATH"
|
||||
fi
|
||||
- |-
|
||||
# Remove unnnecessary cargo and rustup directories.
|
||||
# This keeps the Travis CI cache small and fast.
|
||||
rm -rf "$RUSTUP_HOME"downloads
|
||||
rm -rf "$RUSTUP_HOME"tmp
|
||||
rm -rf "$RUSTUP_HOME"toolchains/*/etc
|
||||
rm -rf "$RUSTUP_HOME"toolchains/*/share
|
||||
|
||||
before_script:
|
||||
# Need to run setup.py in order to download clang-format binary, needed for
|
||||
# test_format.py.
|
||||
- ./tools/setup.py
|
||||
# Start sccache, then throw away the S3 access key.
|
||||
- |-
|
||||
sccache --start-server
|
||||
unset AWS_SECRET_ACCESS_KEY
|
||||
- sccache --start-server
|
||||
- unset AWS_SECRET_ACCESS_KEY
|
||||
- set -e
|
||||
- ./tools/lint.py
|
||||
- ./tools/test_format.py
|
||||
|
||||
# Default script for release builds.
|
||||
script:
|
||||
- ./tools/lint.py
|
||||
- ./tools/test_format.py
|
||||
- cargo clippy --all-targets --release --locked -- -D clippy::all
|
||||
- cargo build --release --locked --all-targets
|
||||
- DENO_BUILD_MODE=release ./tools/test.py
|
||||
# For some reason it's faster to run clippy after build.
|
||||
- rustup component add clippy
|
||||
- cargo clippy --all-targets --release --locked -- -D clippy::all
|
||||
|
||||
jobs:
|
||||
fast_finish: true
|
||||
|
@ -98,10 +84,15 @@ jobs:
|
|||
os: linux
|
||||
after_success:
|
||||
- *gzip_release
|
||||
- ./tools/benchmark.py target/release && cp -r website/* gh-pages/
|
||||
deploy:
|
||||
- *release_provider
|
||||
# Run benchmarks and publish the result to github pages.
|
||||
|
||||
# Run benchmarks and publish the result to github pages.
|
||||
- name: "benchmarks"
|
||||
script:
|
||||
- cargo build --release --locked --all-targets
|
||||
- ./tools/benchmark.py target/release && cp -r website/* gh-pages/
|
||||
deploy:
|
||||
- provider: pages
|
||||
github-token: *github-token
|
||||
keep-history: true
|
||||
|
|
Loading…
Reference in a new issue