Run rustfmt on sr.ht

This should provide more clear feedback whether rustfmt
job is failed or not.
This commit is contained in:
Kirill Chibisov 2020-06-23 13:37:14 +03:00 committed by Christian Duerr
parent 43c0ad6ea9
commit e4e0218ede
4 changed files with 10 additions and 15 deletions

10
.builds/rustfmt.yml Normal file
View file

@ -0,0 +1,10 @@
image: archlinux
sources:
- https://github.com/alacritty/alacritty
tasks:
- rustup: |
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly --profile minimal
$HOME/.cargo/bin/rustup component add rustfmt
- rustfmt: |
cd alacritty
$HOME/.cargo/bin/cargo fmt -- --check

View file

@ -36,10 +36,6 @@ matrix:
os: windows
env: CLIPPY=true
rust: 1.41.0-x86_64-pc-windows-msvc
- name: "Rustfmt"
os: linux
env: RUSTFMT=true
rust: nightly
- name: "Windows 1.41.0"
os: windows
rust: 1.41.0-x86_64-pc-windows-msvc

View file

@ -4,8 +4,3 @@
if [ "$CLIPPY" == "true" ]; then
rustup component add clippy
fi
# Add rustfmt for format validation
if [ "$RUSTFMT" == "true" ]; then
rustup component add rustfmt
fi

View file

@ -6,12 +6,6 @@ if [ "$CLIPPY" == "true" ]; then
exit
fi
# Run clippy rustfmt
if [ "$RUSTFMT" == "true" ]; then
cargo fmt -- --check
exit
fi
# Run test in release mode if a tag is present, to produce an optimized binary
if [ -n "$TRAVIS_TAG" ]; then
# Build separately so we generate an 'alacritty' binary without -HASH appended