Integrate ruma-api

This commit is contained in:
Jonas Platte 2020-06-05 01:59:26 +02:00
parent 51d7875b2f
commit f8b1aef906
No known key found for this signature in database
GPG Key ID: 7D261D771D915378
15 changed files with 2 additions and 111 deletions

View File

@ -1,27 +0,0 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-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-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 --verbose
test_exit=$?
exit $(( $fmt_exit || $clippy_exit || $test_exit ))

View File

@ -1,16 +0,0 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-api
tasks:
- rustup: |
# We specify --profile minimal because we'd otherwise download docs
rustup toolchain install 1.40.0 --profile minimal
rustup default 1.40.0
- test: |
cd ruma-api
# Only make sure the code builds with the MSRV. Tests can require later
# Rust versions, don't compile or run them.
cargo build --verbose

View File

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

View File

@ -1,29 +0,0 @@
image: archlinux
packages:
- rustup
sources:
- https://github.com/ruma/ruma-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-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 --all-features --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

View File

@ -18,17 +18,12 @@ edition = "2018"
[dependencies] [dependencies]
http = "0.2.1" http = "0.2.1"
percent-encoding = "2.1.0" percent-encoding = "2.1.0"
ruma-api-macros = { version = "=0.16.1", path = "ruma-api-macros" } ruma-api-macros = { version = "=0.16.1", path = "../ruma-api-macros" }
ruma-identifiers = "0.16.1" ruma-identifiers = "0.16.1"
ruma-serde = "0.2.0" ruma-serde = { version = "0.2.0", path = "../ruma-serde" }
serde = { version = "1.0.110", features = ["derive"] } serde = { version = "1.0.110", features = ["derive"] }
serde_json = "1.0.53" serde_json = "1.0.53"
strum = "0.18.0" strum = "0.18.0"
[dev-dependencies] [dev-dependencies]
ruma-events = "0.21.1" ruma-events = "0.21.1"
[workspace]
members = [
"ruma-api-macros",
]