1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-03 04:34:21 -05:00
alacritty/ci/script.sh
Christian Duerr d2f4972703
Fix windows tagged builds
The windows tagged builds currently fail some tests since the
winpty-agent.exe is inside the release directory instead of the debug
directory with tagged builds.
2018-11-03 18:46:26 +00:00

34 lines
828 B
Bash
Executable file

#!/bin/bash
# Check if any command failed
error=false
# Run clippy on nightly builds
if [ "$TRAVIS_RUST_VERSION" == "nightly" ]; then
cargo clippy --all-features --all-targets || error=true
fi
# Run test in release mode if a tag is present, to produce an optimized binary
if [ -n "$TRAVIS_TAG" ]; then
cargo test --release || error=true
else
cargo test || error=true
fi
# Test the font subcrate
cargo test -p font || error=true
# Test the winpty subcrate
if [ "$TRAVIS_OS_NAME" == "windows" ]; then
if [ -n "$TRAVIS_TAG" ]; then
mkdir -p "./target/debug/deps"
cp "./target/release/winpty-agent.exe" "./target/debug/deps"
else
cp "./target/debug/winpty-agent.exe" "./target/debug/deps"
fi
cargo test -p winpty || error=true
fi
if [ $error == "true" ]; then
exit 1
fi