mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-23 12:43:09 +00:00
73 lines
2.7 KiB
YAML
73 lines
2.7 KiB
YAML
language: rust
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
os:
|
|
- linux
|
|
- osx
|
|
- windows
|
|
jobs:
|
|
allow_failures:
|
|
- rust: nightly
|
|
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems. TODO: Add test for it, but keep allow fail.
|
|
fast_finish: true
|
|
|
|
before_install:
|
|
- export RUST_BACKTRACE=1
|
|
- |
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
export TARGET=x86_64-unknown-linux-gnu;
|
|
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
|
export TARGET=x86_64-pc-windows-msvc;
|
|
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
|
export TARGET=x86_64-apple-darwin;
|
|
fi
|
|
before_script:
|
|
- rustup target add $TARGET
|
|
- rustup component add clippy || rustup component add clippy --nightly || rustup component add clippy-preview || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy || true
|
|
script:
|
|
- cargo clippy -- -D clippy::all
|
|
- cargo build --verbose --target $TARGET
|
|
- cargo test --verbose --target $TARGET
|
|
|
|
# Need to cache the whole `.cargo` directory to keep .crates.toml for cargo-update to work
|
|
cache:
|
|
directories:
|
|
- /home/travis/.cargo
|
|
|
|
# But don't cache the cargo registry.
|
|
before_cache:
|
|
- rm -rf /home/travis/.cargo/git
|
|
- rm -rf /home/travis/.cargo/registry
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
|
|
after_script:
|
|
- |
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
cp ./target/x86_64-unknown-linux-gnu/debug/btm btm;
|
|
tar -czvf bottom_x86_64-unknown-linux-gnu.tar.gz btm;
|
|
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
|
cp ./target/x86_64-pc-windows-msvc/debug/btm btm;
|
|
tar -czvf bottom_x86_64-pc-windows-msvc.tar.gz btm;
|
|
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
|
cp ./target/x86_64-apple-darwin/debug/btm btm;
|
|
tar -czvf bottom_x86_64-apple-darwin.tar.gz btm;
|
|
fi
|
|
|
|
deploy:
|
|
provider: releases
|
|
api_key:
|
|
secure: nAzTrDADUZVpiTkpaTjfEZMFfyfgJV0jwrGvHx0u+DorGQIeuKIY+HTm6iOmU5OAdhPs5MBgqKJK2s9XoOxbw4qcC5uPHaRICX3yd63zi49gBwkE0FkCDOfrjR3xnsf9jNVFzfFFIoYAjY/67J9hzVmc9z9uhXIuokj6Hp0md/snjYpjeQi6QRi9n4zsTR60a4NanbeYJ9D+TdoJ4UyA3pdl7JOtQHwxgNPPpDij4aPz4mmdq0mlpFBYAMksMi9xhBXzB/AUgnsKvchpMcDZER2icHS5Yerq4buxcQjQgMYG10MKq24BeMfMR4lu9SAtKSgcclXvLDLdmY5DeMbrbup51xcuWcqouVwdw8aI7jOskFUKFFSmdEtEGeBG6PCf2fjsjpMjy0kZaO4HxS5kJJewLgXgpgQUQjRL5i2KGpO1pnMD4ev7CcdMrnQHZlNXbi6k6Z9FCOQukIcsmMjQEk4w2JSUCfX53wqQPV3ID4QKckTWrZkSayiet6rRFrRK4087fl7G3JjIMYG7+QbP8PoFkCCH3aUOPCg+3J2YockYB2Zjgnq/E/WNrt1rYxwA6ssKn8+7KqCLzXIv3gFHx9htE7nEvH6QH9dAacjT3bbaxkHpuS6+orxM12vL7+9K6j9HdePK8YqO+lByUmlBG8p91WIhgYkV4vLTAtO9FqA=
|
|
file:
|
|
- bottom_x86_64-unknown-linux-gnu.tar.gz
|
|
- bottom_x86_64-pc-windows-msvc.tar.gz
|
|
- bottom_x86_64-apple-darwin.tar.gz
|
|
cleanup: false
|
|
on:
|
|
tags: true
|
|
repo: ClementTsang/bottom
|
|
draft: true
|