run cargo fmt -- --check on beta
This commit is contained in:
parent
eebafc76dd
commit
392a0fb886
@ -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
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,11 @@
|
||||
set -euxo pipefail
|
||||
|
||||
main() {
|
||||
if [ $TARGET = cargo-fmt ]; then
|
||||
cargo fmt -- --check
|
||||
return
|
||||
fi
|
||||
|
||||
# quick check
|
||||
cargo check
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user