Jonas Platte 916586e56a Add 'ruma-signatures/' from commit '1ca545cba8dfd43e0fc8e3c18e1311fb73390a97'
git-subtree-dir: ruma-signatures
git-subtree-mainline: 50b74e2b7633f0c4dddb9a71313dc198c58a3074
git-subtree-split: 1ca545cba8dfd43e0fc8e3c18e1311fb73390a97
2020-06-05 17:20:12 +02:00

33 lines
917 B
YAML

image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-signatures
tasks:
- rustup: |
rustup toolchain install nightly --profile minimal
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: |
cd ruma-signatures
# We don't want the build to stop on individual failure of independent
# tools, so capture tool exit codes and set the task exit code manually
set +e
if ( rustup component list | grep -q rustfmt ); then
cargo fmt -- --check
fi
fmt_exit=$?
if ( rustup component list | grep -q clippy ); then
cargo clippy --all-targets --all-features -- -D warnings
fi
clippy_exit=$?
exit $(( $fmt_exit || $clippy_exit ))