ruwuma/.builds/nightly.yml
2020-08-25 16:25:05 +02:00

33 lines
915 B
YAML

image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma
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
# 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 --all -- --check
fi
fmt_exit=$?
if ( rustup component list | grep -q clippy ); then
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
fi
clippy_exit=$?
exit $(( $fmt_exit || $clippy_exit ))