Jonas Platte 83de77f002 Add 'ruma-identifiers/' from commit 'c0a1d8bd440c7cde0fa4ab5e22898ddb26bb706d'
git-subtree-dir: ruma-identifiers
git-subtree-mainline: 19ce9645b6651e4de42ddf9e81ee50e19c8c0f26
git-subtree-split: c0a1d8bd440c7cde0fa4ab5e22898ddb26bb706d
2020-06-07 17:06:45 +02:00

33 lines
919 B
YAML

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