67 lines
1.8 KiB
YAML
67 lines
1.8 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 stable --profile minimal
|
|
rustup default stable
|
|
- 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 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.
|
|
pushd ruma-identifiers
|
|
|
|
cargo test --no-default-features --quiet
|
|
id_test_1_exit=$?
|
|
|
|
cargo test --all-features --quiet
|
|
id_test_2_exit=$?
|
|
|
|
popd
|
|
|
|
# ruma-client_api also has a few optional features, but none are enabled
|
|
# by default. Make sure it works with all of them.
|
|
pushd ruma-client-api
|
|
|
|
cargo check --all-features --quiet
|
|
client_api_exit=$?
|
|
|
|
popd
|
|
|
|
# Test non-default configurations of ruma-client
|
|
pushd ruma-client
|
|
|
|
cargo check --no-default-features --features http1,http2 --quiet
|
|
client_1_exit=$?
|
|
|
|
cargo check --no-default-features --features http1,http2,tls-rustls-native-roots --quiet
|
|
client_2_exit=$?
|
|
|
|
cargo check --no-default-features --features http1,http2,tls-rustls-webpki-roots --quiet
|
|
client_3_exit=$?
|
|
|
|
popd
|
|
|
|
exit $(( \
|
|
$test_exit \
|
|
|| $id_test_1_exit \
|
|
|| $id_test_2_exit \
|
|
|| $client_api_exit \
|
|
|| $client_1_exit \
|
|
|| $client_2_exit \
|
|
|| $client_3_exit \
|
|
))
|
|
# TODO: Add audit task once cargo-audit binary releases are available.
|
|
# See https://github.com/RustSec/cargo-audit/issues/66
|