2018-11-03 11:08:30 -04:00
|
|
|
#!/bin/bash
|
|
|
|
|
2019-01-23 17:04:45 -05:00
|
|
|
# Run clippy checks
|
|
|
|
if [ "$CLIPPY" == "true" ]; then
|
|
|
|
cargo clippy --all-targets
|
|
|
|
exit
|
2018-11-03 11:08:30 -04:00
|
|
|
fi
|
|
|
|
|
2019-03-30 12:48:36 -04:00
|
|
|
# Run clippy rustfmt
|
|
|
|
if [ "$RUSTFMT" == "true" ]; then
|
|
|
|
cargo fmt -- --check
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2018-11-03 11:08:30 -04:00
|
|
|
# Run test in release mode if a tag is present, to produce an optimized binary
|
|
|
|
if [ -n "$TRAVIS_TAG" ]; then
|
2019-04-28 09:24:58 -04:00
|
|
|
# Build separately so we generate an 'alacritty' binary without -HASH appended
|
|
|
|
cargo build --release
|
|
|
|
cargo test --release
|
2018-11-03 11:08:30 -04:00
|
|
|
else
|
2019-04-28 09:24:58 -04:00
|
|
|
cargo test
|
2018-11-03 11:08:30 -04:00
|
|
|
fi
|