ruwuma/ruma-api/.builds/nightly.yml
Jonas Platte 51d7875b2f Add 'ruma-api/' from commit '2151711f64e99a5da370d48fa92795f2d4799866'
git-subtree-dir: ruma-api
git-subtree-mainline: bb037a5c42c51567a3b9e41c2c131cef9867a4aa
git-subtree-split: 2151711f64e99a5da370d48fa92795f2d4799866
2020-06-05 01:56:19 +02:00

33 lines
903 B
YAML

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