1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-18 13:55:23 -05:00
alacritty/ci/script.sh
Christian Duerr 430b89c159
Move clippy tests to stable
The clippy tests had to be run on nightly previously since it wasn't
available with the stable compiler yet, however this had the potential
to fail a lot since not all nightly builds offer clippy.

Since clippy is now available for stable rust, moving clippy to a stable
build should make sure that the failure rate of the CI job is cut down
to a minimum.

This fixes https://github.com/jwilm/alacritty/issues/2007.
2019-01-23 22:04:45 +00:00

35 lines
781 B
Bash
Executable file

#!/bin/bash
# Check if any command failed
error=false
# Run clippy checks
if [ "$CLIPPY" == "true" ]; then
cargo clippy --all-targets
exit
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