run cargo fmt -- --check on beta

This commit is contained in:
Jorge Aparicio 2018-07-13 22:10:08 -05:00
parent eebafc76dd
commit 392a0fb886
3 changed files with 12 additions and 4 deletions

View File

@ -15,6 +15,8 @@ matrix:
- env: TARGET=powerpc64-unknown-linux-gnu
- env: TARGET=powerpc64le-unknown-linux-gnu
- env: TARGET=x86_64-unknown-linux-gnu
- env: TARGET=cargo-fmt
rust: beta
before_install: set -e
@ -22,8 +24,6 @@ install:
- bash ci/install.sh
script:
# code must be already formatted
- cargo fmt -- --check
- bash ci/script.sh
after_script: set +e

View File

@ -1,12 +1,15 @@
set -euxo pipefail
main() {
if [ $TARGET = cargo-fmt ]; then
rustup component add rustfmt-preview
return
fi
if ! hash cross >/dev/null 2>&1; then
cargo install cross
fi
rustup component add rustfmt-preview
rustup target add x86_64-unknown-linux-musl
if [ $TARGET != x86_64-unknown-linux-gnu ]; then

View File

@ -1,6 +1,11 @@
set -euxo pipefail
main() {
if [ $TARGET = cargo-fmt ]; then
cargo fmt -- --check
return
fi
# quick check
cargo check