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 1.43.0 --profile minimal rustup default 1.43.0 - 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 # We don't want to try building ruma-signatures on 1.43.0, since it # depends on ring (MSRV 'stable') and is exempt from our MSRV policy. # Instead, enable all other dependencies on the ruma crate and try # building that (usually you would enable the higher-level features, but # we're only doing this to have all relevant crates compiled, no to build # a useful crate). pushd ruma cargo build \ --features ruma-events,ruma-api,ruma-appservice-api,ruma-client-api,ruma-federation-api,ruma-identity-service-api,ruma-push-gateway-api \ --quiet ruma_build_exit=$? # ruma-client isn't re-exported by ruma right now, so it needs to be built # separately pushd ruma-client cargo build --quiet client_build_exit=$? popd # 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 build --no-default-features --quiet id_build_1_exit=$? cargo build --all-features --quiet id_build_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 build --all-features --verbose client_api_build_exit=$? popd exit $(( $ruma_build_exit || $client_build_exit || $id_build_1_exit || $id_build_2_exit || $client_api_build_exit ))