Switch CI from travis to builds.sr.ht
This commit is contained in:
parent
9b3156ad6c
commit
4ec060071d
27
.builds/beta.yml
Normal file
27
.builds/beta.yml
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
image: archlinux
|
||||||
|
packages:
|
||||||
|
- rustup
|
||||||
|
sources:
|
||||||
|
- https://github.com/ruma/ruma-client
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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 --verbose
|
||||||
|
test_exit=$?
|
||||||
|
|
||||||
|
exit $(( $fmt_exit || $clippy_exit || $test_exit ))
|
32
.builds/nightly.yml
Normal file
32
.builds/nightly.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
image: archlinux
|
||||||
|
packages:
|
||||||
|
- rustup
|
||||||
|
sources:
|
||||||
|
- https://github.com/ruma/ruma-client
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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 ))
|
29
.builds/stable.yml
Normal file
29
.builds/stable.yml
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
image: archlinux
|
||||||
|
packages:
|
||||||
|
- rustup
|
||||||
|
sources:
|
||||||
|
- https://github.com/ruma/ruma-client
|
||||||
|
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
|
||||||
|
|
||||||
|
# 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 --verbose
|
||||||
|
test_exit=$?
|
||||||
|
|
||||||
|
exit $(( $fmt_exit || $clippy_exit || $test_exit ))
|
||||||
|
# TODO: Add audit task once cargo-audit binary releases are available.
|
||||||
|
# See https://github.com/RustSec/cargo-audit/issues/66
|
28
.travis.yml
28
.travis.yml
@ -1,28 +0,0 @@
|
|||||||
language: "rust"
|
|
||||||
rust:
|
|
||||||
- stable
|
|
||||||
- beta
|
|
||||||
- nightly
|
|
||||||
jobs:
|
|
||||||
allow_failures:
|
|
||||||
- rust: nightly
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
before_script:
|
|
||||||
- rustup component add rustfmt
|
|
||||||
- rustup component add clippy
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
|
|
||||||
cargo install --force cargo-audit
|
|
||||||
fi
|
|
||||||
- cargo generate-lockfile
|
|
||||||
script:
|
|
||||||
- |
|
|
||||||
if [ "$TRAVIS_RUST_VERSION" == "stable" ]; then
|
|
||||||
cargo audit
|
|
||||||
fi
|
|
||||||
- cargo fmt -- --check
|
|
||||||
- cargo clippy --all-targets --all-features -- -D warnings
|
|
||||||
- cargo build --verbose
|
|
||||||
- cargo test --verbose
|
|
||||||
if: "type != push OR (tag IS blank AND branch = master)"
|
|
Loading…
x
Reference in New Issue
Block a user