run cargo fmt -- --check on beta
This commit is contained in:
@@ -15,6 +15,8 @@ matrix:
|
|||||||
- env: TARGET=powerpc64-unknown-linux-gnu
|
- env: TARGET=powerpc64-unknown-linux-gnu
|
||||||
- env: TARGET=powerpc64le-unknown-linux-gnu
|
- env: TARGET=powerpc64le-unknown-linux-gnu
|
||||||
- env: TARGET=x86_64-unknown-linux-gnu
|
- env: TARGET=x86_64-unknown-linux-gnu
|
||||||
|
- env: TARGET=cargo-fmt
|
||||||
|
rust: beta
|
||||||
|
|
||||||
before_install: set -e
|
before_install: set -e
|
||||||
|
|
||||||
@@ -22,8 +24,6 @@ install:
|
|||||||
- bash ci/install.sh
|
- bash ci/install.sh
|
||||||
|
|
||||||
script:
|
script:
|
||||||
# code must be already formatted
|
|
||||||
- cargo fmt -- --check
|
|
||||||
- bash ci/script.sh
|
- bash ci/script.sh
|
||||||
|
|
||||||
after_script: set +e
|
after_script: set +e
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
if [ $TARGET = cargo-fmt ]; then
|
||||||
|
rustup component add rustfmt-preview
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if ! hash cross >/dev/null 2>&1; then
|
if ! hash cross >/dev/null 2>&1; then
|
||||||
cargo install cross
|
cargo install cross
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rustup component add rustfmt-preview
|
|
||||||
|
|
||||||
rustup target add x86_64-unknown-linux-musl
|
rustup target add x86_64-unknown-linux-musl
|
||||||
|
|
||||||
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
|
if [ $TARGET != x86_64-unknown-linux-gnu ]; then
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
if [ $TARGET = cargo-fmt ]; then
|
||||||
|
cargo fmt -- --check
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
# quick check
|
# quick check
|
||||||
cargo check
|
cargo check
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user