Do less work on CI
rustfmt and clippy are now basically guaranteed to be available on Nightly, so run them unconditionally and only there.
This commit is contained in:
parent
6c8bac949e
commit
1282e1cfad
@ -6,7 +6,7 @@ sources:
|
|||||||
tasks:
|
tasks:
|
||||||
- rustup: |
|
- rustup: |
|
||||||
# We specify --profile minimal because we'd otherwise download docs
|
# We specify --profile minimal because we'd otherwise download docs
|
||||||
rustup toolchain install 1.43.0 --profile minimal -c rustfmt -c clippy
|
rustup toolchain install 1.43.0 --profile minimal
|
||||||
rustup default 1.43.0
|
rustup default 1.43.0
|
||||||
- test: |
|
- test: |
|
||||||
cd ruma
|
cd ruma
|
||||||
|
@ -6,7 +6,7 @@ sources:
|
|||||||
tasks:
|
tasks:
|
||||||
- rustup: |
|
- rustup: |
|
||||||
# We specify --profile minimal because we'd otherwise download docs
|
# We specify --profile minimal because we'd otherwise download docs
|
||||||
rustup toolchain install beta --profile minimal -c rustfmt -c clippy
|
rustup toolchain install beta --profile minimal
|
||||||
rustup default beta
|
rustup default beta
|
||||||
- test: |
|
- test: |
|
||||||
cd ruma
|
cd ruma
|
||||||
@ -15,12 +15,6 @@ tasks:
|
|||||||
# tools, so capture tool exit codes and set the task exit code manually
|
# tools, so capture tool exit codes and set the task exit code manually
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
cargo fmt --all -- --check
|
|
||||||
fmt_exit=$?
|
|
||||||
|
|
||||||
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
|
|
||||||
clippy_exit=$?
|
|
||||||
|
|
||||||
cargo test --all --quiet
|
cargo test --all --quiet
|
||||||
test_exit=$?
|
test_exit=$?
|
||||||
|
|
||||||
@ -45,4 +39,4 @@ tasks:
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
exit $(( $fmt_exit || $clippy_exit || $test_exit || $id_test_1_exit || $id_test_2_exit || $client_api_exit ))
|
exit $(( $test_exit || $id_test_1_exit || $id_test_2_exit || $client_api_exit ))
|
||||||
|
@ -5,13 +5,8 @@ sources:
|
|||||||
- https://github.com/ruma/ruma
|
- https://github.com/ruma/ruma
|
||||||
tasks:
|
tasks:
|
||||||
- rustup: |
|
- rustup: |
|
||||||
rustup toolchain install nightly --profile minimal
|
rustup toolchain install nightly --profile minimal -c rustfmt,clippy
|
||||||
rustup default nightly
|
rustup default nightly
|
||||||
|
|
||||||
# Try installing rustfmt & clippy for nightly, but don't fail the build
|
|
||||||
# if they are not available
|
|
||||||
rustup component add rustfmt || true
|
|
||||||
rustup component add clippy || true
|
|
||||||
- test: |
|
- test: |
|
||||||
cd ruma
|
cd ruma
|
||||||
|
|
||||||
@ -19,14 +14,10 @@ tasks:
|
|||||||
# tools, so capture tool exit codes and set the task exit code manually
|
# tools, so capture tool exit codes and set the task exit code manually
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
if ( rustup component list | grep -q rustfmt ); then
|
|
||||||
cargo fmt --all -- --check
|
cargo fmt --all -- --check
|
||||||
fi
|
|
||||||
fmt_exit=$?
|
fmt_exit=$?
|
||||||
|
|
||||||
if ( rustup component list | grep -q clippy ); then
|
|
||||||
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
|
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
|
||||||
fi
|
|
||||||
clippy_exit=$?
|
clippy_exit=$?
|
||||||
|
|
||||||
exit $(( $fmt_exit || $clippy_exit ))
|
exit $(( $fmt_exit || $clippy_exit ))
|
||||||
|
@ -6,7 +6,7 @@ sources:
|
|||||||
tasks:
|
tasks:
|
||||||
- rustup: |
|
- rustup: |
|
||||||
# We specify --profile minimal because we'd otherwise download docs
|
# We specify --profile minimal because we'd otherwise download docs
|
||||||
rustup toolchain install stable --profile minimal -c rustfmt -c clippy
|
rustup toolchain install stable --profile minimal
|
||||||
rustup default stable
|
rustup default stable
|
||||||
- test: |
|
- test: |
|
||||||
cd ruma
|
cd ruma
|
||||||
@ -15,12 +15,6 @@ tasks:
|
|||||||
# tools, so capture tool exit codes and set the task exit code manually
|
# tools, so capture tool exit codes and set the task exit code manually
|
||||||
set +e
|
set +e
|
||||||
|
|
||||||
cargo fmt --all -- --check
|
|
||||||
fmt_exit=$?
|
|
||||||
|
|
||||||
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
|
|
||||||
clippy_exit=$?
|
|
||||||
|
|
||||||
cargo test --all --quiet
|
cargo test --all --quiet
|
||||||
test_exit=$?
|
test_exit=$?
|
||||||
|
|
||||||
@ -45,6 +39,6 @@ tasks:
|
|||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
exit $(( $fmt_exit || $clippy_exit || $test_exit || $id_test_1_exit || $id_test_2_exit || $client_api_exit ))
|
exit $(( $test_exit || $id_test_1_exit || $id_test_2_exit || $client_api_exit ))
|
||||||
# TODO: Add audit task once cargo-audit binary releases are available.
|
# TODO: Add audit task once cargo-audit binary releases are available.
|
||||||
# See https://github.com/RustSec/cargo-audit/issues/66
|
# See https://github.com/RustSec/cargo-audit/issues/66
|
||||||
|
Loading…
x
Reference in New Issue
Block a user