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

45 lines
1.3 KiB
YAML

image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma
tasks:
- rustup: |
# We specify --profile minimal because we'd otherwise download docs
rustup toolchain install beta --profile minimal -c rustfmt -c clippy
rustup default beta
- 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
cargo fmt --all -- --check
fmt_exit=$?
cargo clippy --all --all-targets --all-features --quiet -- -D warnings
clippy_exit=$?
cargo test --all --quiet
test_exit=$?
# ruma-identifiers has a bunch of features. Make sure it works both with
# all of them and none of them being enabled.
cd ruma-identifiers
cargo test --no-default-features --quiet
id_test_1_exit=$?
cargo test --all-features --quiet
id_test_2_exit=$?
# ruma-client_api also has a few optional features, but none are enabled
# by default. Make sure it works with all of them.
cd ruma-client-api
cargo check --all-features --verbose
client_api_exit=$?
exit $(( $fmt_exit || $clippy_exit || $test_exit || $id_test_1_exit || $id_test_2_exit || $client_api_exit ))