-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add option to cancel jobs. Fixes #17
- Loading branch information
Showing
5 changed files
with
188 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Fail the script on any error | ||
set -e | ||
|
||
# | ||
# This is a helper script so that when giant-squid is ready to be | ||
# released, this can check to ensure that it works in the | ||
# minimum Rust version (MSRV) as specified in Cargo.toml | ||
# | ||
# It assumes: | ||
# 1. You run this from inside the "tools" directory | ||
# 2. You have rustup installed | ||
# | ||
|
||
# Switch to the root giant-squid dir | ||
pushd .. | ||
|
||
# update rust | ||
echo "Updating rust..." | ||
rustup update | ||
|
||
# Ensure MSRV version of rust is installed | ||
MIN_RUST=$(grep -m1 "rust-version" Cargo.toml | sed 's|.*\"\(.*\)\"|\1|') | ||
echo "Installing MSRV ${MIN_RUST}..." | ||
rustup install ${MIN_RUST} | ||
|
||
# Clear everything | ||
cargo clean | ||
rm -rf target | ||
|
||
# Update dependencies | ||
echo "Updating cargo dependencies..." | ||
RUSTUP_TOOLCHAIN=${MIN_RUST} cargo update --verbose | ||
|
||
# Build and run rust tests | ||
echo "Building and running tests..." | ||
RUSTUP_TOOLCHAIN=${MIN_RUST} cargo test --release --all-features | ||
|
||
# Switch back to this dir | ||
popd |