ruwuma/ruma-serde/.builds/nightly.yml
Jonas Platte f8a25dabca Add 'ruma-serde/' from commit '851ffea6d20bef1c66f1c8e0ceb4d4a00c9804fc'
git-subtree-dir: ruma-serde
git-subtree-mainline: ec8f70f42a5a3e44e082de21b153d5ff2bece72d
git-subtree-split: 851ffea6d20bef1c66f1c8e0ceb4d4a00c9804fc
2020-06-05 01:27:53 +02:00

33 lines
907 B
YAML

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