Add builds.sr.ht manifests

This commit is contained in:
Jonas Platte 2020-04-24 18:49:49 +02:00
parent 6e990236c2
commit ac44889922
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
4 changed files with 120 additions and 0 deletions

30
.builds/beta.yml Normal file
View File

@ -0,0 +1,30 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-client-api
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-client-api
# 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 -- --check
fmt_exit=$?
cargo clippy --all-targets --all-features -- -D warnings
clippy_exit=$?
cargo test --no-default-features --verbose
test1_exit=$?
cargo test --all-features --verbose
test2_exit=$?
exit $(( $fmt_exit || $clippy_exit || $test1_exit || $test2_exit ))

26
.builds/msrv.yml Normal file
View File

@ -0,0 +1,26 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-client-api
tasks:
- rustup: |
# We specify --profile minimal because we'd otherwise download docs
rustup toolchain install 1.39.0 --profile minimal
rustup default 1.39.0
- test: |
cd ruma-client-api
# 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
# Only make sure the code builds with the MSRV. Tests can require later
# Rust versions, don't compile or run them.
cargo build --no-default-features --verbose
build1_exit=$?
cargo build --all-features --verbose
build2_exit=$?
exit $(( $build1_exit || $build2_exit ))

32
.builds/nightly.yml Normal file
View File

@ -0,0 +1,32 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-client-api
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-client-api
# 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 ))

32
.builds/stable.yml Normal file
View File

@ -0,0 +1,32 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-client-api
tasks:
- rustup: |
# We specify --profile minimal because we'd otherwise download docs
rustup toolchain install stable --profile minimal -c rustfmt -c clippy
rustup default stable
- test: |
cd ruma-client-api
# 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 -- --check
fmt_exit=$?
cargo clippy --all-targets --all-features -- -D warnings
clippy_exit=$?
cargo test --no-default-features --verbose
test1_exit=$?
cargo test --all-features --verbose
test2_exit=$?
exit $(( $fmt_exit || $clippy_exit || $test1_exit || $test2_exit ))
# TODO: Add audit task once cargo-audit binary releases are available.
# See https://github.com/RustSec/cargo-audit/issues/66