Jonas Platte 6329cd471e Add 'ruma-client-api/' from commit '632eb9d520028816c5fb7224bd0aca8d1e3793f1'
git-subtree-dir: ruma-client-api
git-subtree-mainline: e5233c49f610f866e3c9bf8529a0613171fc2fe4
git-subtree-split: 632eb9d520028816c5fb7224bd0aca8d1e3793f1
2020-06-05 17:11:09 +02:00

33 lines
917 B
YAML

image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-client-api
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-client-api
# 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 ))