2019-09-13 23:12:01 +00:00
|
|
|
language: rust
|
|
|
|
rust:
|
2020-05-04 22:53:05 +00:00
|
|
|
# MSRV; though I only want to test if it builds.
|
2020-05-04 21:45:06 +00:00
|
|
|
- 1.40.0
|
2019-11-07 19:55:24 +00:00
|
|
|
- stable
|
2020-02-21 01:19:56 +00:00
|
|
|
- beta
|
2019-12-31 03:01:34 +00:00
|
|
|
os:
|
|
|
|
- linux
|
|
|
|
- osx
|
|
|
|
- windows
|
2019-12-07 04:52:28 +00:00
|
|
|
jobs:
|
2020-01-03 05:20:47 +00:00
|
|
|
fast_finish: true
|
2020-04-11 00:02:25 +00:00
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
|
2019-12-31 02:25:20 +00:00
|
|
|
|
2019-12-31 03:01:34 +00:00
|
|
|
before_install:
|
|
|
|
- export RUST_BACKTRACE=1
|
2019-12-31 03:09:35 +00:00
|
|
|
- |
|
|
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
|
|
|
export TARGET=x86_64-unknown-linux-gnu;
|
2019-12-31 03:01:34 +00:00
|
|
|
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
2019-12-31 03:09:35 +00:00
|
|
|
export TARGET=x86_64-pc-windows-msvc;
|
2019-12-31 03:17:03 +00:00
|
|
|
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
2019-12-31 03:09:35 +00:00
|
|
|
export TARGET=x86_64-apple-darwin;
|
2019-12-31 03:01:34 +00:00
|
|
|
fi
|
2020-02-10 05:26:34 +00:00
|
|
|
before_script:
|
|
|
|
- rustup target add $TARGET
|
2020-02-18 04:01:58 +00:00
|
|
|
- rustup component add clippy
|
2019-12-31 00:40:45 +00:00
|
|
|
script:
|
2020-02-18 04:01:58 +00:00
|
|
|
- cargo clippy -- -D clippy::all
|
2020-01-03 05:20:47 +00:00
|
|
|
- cargo build --verbose --target $TARGET
|
2020-05-04 22:53:05 +00:00
|
|
|
- |
|
|
|
|
if [[ $TRAVIS_RUST_VERSION != "1.40.0" ]]; then
|
|
|
|
cargo test --verbose --target $TARGET;
|
|
|
|
fi
|
2019-10-10 20:36:29 +00:00
|
|
|
|
2019-12-31 01:56:10 +00:00
|
|
|
# Need to cache the whole `.cargo` directory to keep .crates.toml for cargo-update to work
|
2019-12-27 23:30:35 +00:00
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- /home/travis/.cargo
|
2019-12-16 07:31:49 +00:00
|
|
|
|
2019-12-31 01:56:10 +00:00
|
|
|
# But don't cache the cargo registry.
|
2019-12-27 23:30:35 +00:00
|
|
|
before_cache:
|
2019-12-31 00:40:45 +00:00
|
|
|
- rm -rf /home/travis/.cargo/git
|
2019-12-27 23:30:35 +00:00
|
|
|
- rm -rf /home/travis/.cargo/registry
|
2019-12-16 07:31:49 +00:00
|
|
|
|
2019-10-10 20:36:29 +00:00
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|
2020-02-18 01:29:41 +00:00
|
|
|
|
2020-02-19 05:06:52 +00:00
|
|
|
before_deploy:
|
2020-02-26 03:06:17 +00:00
|
|
|
- cargo install --path . --target $TARGET
|
2020-04-09 19:28:43 +00:00
|
|
|
- cargo update
|
2020-02-18 01:29:41 +00:00
|
|
|
- |
|
2020-02-20 06:37:46 +00:00
|
|
|
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
2020-02-25 18:39:53 +00:00
|
|
|
choco install zip;
|
2020-02-22 05:41:55 +00:00
|
|
|
rustup target add x86_64-pc-windows-msvc;
|
|
|
|
cargo build --release --target x86_64-pc-windows-msvc;
|
2020-02-25 18:39:53 +00:00
|
|
|
strip "./target/x86_64-pc-windows-msvc/release/btm";
|
2020-03-24 03:02:29 +00:00
|
|
|
mv "./target/x86_64-pc-windows-msvc/release/btm" "btm.exe";
|
|
|
|
zip bottom_x86_64-pc-windows-msvc.zip "btm.exe";
|
2020-02-22 05:41:55 +00:00
|
|
|
rustup target add i686-pc-windows-msvc;
|
|
|
|
cargo build --release --target i686-pc-windows-msvc;
|
2020-02-25 18:39:53 +00:00
|
|
|
strip "./target/i686-pc-windows-msvc/release/btm";
|
2020-03-24 03:02:29 +00:00
|
|
|
mv "./target/i686-pc-windows-msvc/release/btm" "btm.exe";
|
|
|
|
zip bottom_i686-pc-windows-msvc.zip "btm.exe";
|
2020-02-20 06:37:46 +00:00
|
|
|
else
|
|
|
|
cargo build --release;
|
|
|
|
cp ./target/release/btm btm;
|
|
|
|
strip btm;
|
|
|
|
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
|
2020-02-22 05:41:55 +00:00
|
|
|
tar -czvf bottom_x86_64-unknown-linux-gnu.tar.gz btm;
|
2020-04-08 23:44:29 +00:00
|
|
|
tar -czvf bottom_required_files.tar.gz ./src ./Cargo.toml ./Cargo.lock LICENSE README.md;
|
2020-02-22 23:38:18 +00:00
|
|
|
cargo install cargo-deb;
|
|
|
|
cargo deb;
|
|
|
|
cp ./target/debian/bottom_*.deb .;
|
2020-02-20 06:37:46 +00:00
|
|
|
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
|
2020-02-22 05:41:55 +00:00
|
|
|
tar -czvf bottom_x86_64-apple-darwin.tar.gz btm;
|
2020-02-20 06:37:46 +00:00
|
|
|
fi
|
2020-02-18 01:29:41 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
provider: releases
|
2020-02-21 05:49:10 +00:00
|
|
|
overwrite: true
|
2020-05-04 22:53:05 +00:00
|
|
|
token:
|
2020-02-20 03:59:20 +00:00
|
|
|
secure: ppBn0DnqZ+Rzb84doZQxYdUBQ0rVrZNIiH6ZSFEiCVJd0ttqXfOjK/qXbIf/zabwO0Olqz18jwd9piHjNigWRrHwX9N+YH0DZTM3f4WS2/2acvOP3AjSw6oERjYTwS5yKe/XP1sU11uL6O0oAxYFeiAkn7QOM7flVUE2BmmLAs2lLtQ+9ylmUeBGatrkTfQ0Z2i1o7p5mtI2fKUozpImtHq8TClQEsF4oQS5nvkHtpLuPQ0UrJ8vKZijDBeMuLbDkR121ujRnjoBt8+eXBRbwzAvVotwRozyol8noAN3i4VvYueId6oX7Y2DSEp26wnCuRXGurUnyya5JE55AKoevK+SUHRe5+29/2lPbC5d/etZt2tSX1AIJk9fHeIfRPSTzanIIyDpUzSGoMKjl1ARKGrgHYehRxMKpW0cC2xHSlQ+NrA5apLpXKr2IzpkGsxpAxLqRASbX2VJYCEL70WoJfXinZrxeDxXsaWBLGaj9ySyk059GZBMz9GBdYNtwF3G/3aSIt0nkEGgKipgYXHi5keKKGmyfeZyYkRJRbc369JRZiHuOWct+1ZsOdrKKdbyAdcDGj5kbKuYwA6E+wgI62IWvUTm+vtKDuIbLpu/48aOUuEslGHkYAszLTapX/Le9c9XTu3L+PMgkPq2LSyaeGrfnM+DE/Hwe3Jvurccp94=
|
2020-02-20 04:46:07 +00:00
|
|
|
file_glob: true
|
2020-02-22 05:41:55 +00:00
|
|
|
file:
|
|
|
|
- bottom_*.tar.gz
|
|
|
|
- bottom_*.zip
|
2020-02-22 23:38:18 +00:00
|
|
|
- bottom_*.deb
|
2020-02-18 01:29:41 +00:00
|
|
|
on:
|
|
|
|
tags: true
|
2020-02-20 03:59:20 +00:00
|
|
|
condition: "$TRAVIS_RUST_VERSION = stable"
|
2020-02-18 01:29:41 +00:00
|
|
|
repo: ClementTsang/bottom
|
|
|
|
draft: true
|