Skip to content

Commit 31b76ff

Browse files
authored
add continuous integration workflows (#18)
1 parent ea48b9a commit 31b76ff

File tree

7 files changed

+108
-6
lines changed

7 files changed

+108
-6
lines changed

.clippy.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
msrv = "1.46"

.github/workflows/CI.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
on:
2+
push:
3+
branches: [master, develop]
4+
pull_request:
5+
6+
name: Continuous integration
7+
8+
jobs:
9+
10+
check:
11+
name: check
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
build: [msrv, stable, beta, nightly, macos, windows]
16+
include:
17+
- build: msrv
18+
os: ubuntu-latest
19+
rust: 1.46
20+
- build: stable
21+
os: ubuntu-latest
22+
rust: stable
23+
- build: beta
24+
os: ubuntu-latest
25+
rust: beta
26+
- build: nightly
27+
os: ubuntu-latest
28+
rust: nightly
29+
- build: macos
30+
os: macos-latest
31+
rust: stable
32+
- build: windows
33+
os: windows-latest
34+
rust: stable
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
submodules: true
39+
- uses: actions-rs/toolchain@v1
40+
with:
41+
profile: minimal
42+
toolchain: ${{ matrix.rust }}
43+
override: true
44+
components: rustfmt
45+
- uses: actions-rs/cargo@v1
46+
with:
47+
command: check
48+
49+
fmt:
50+
name: format
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v2
54+
with:
55+
submodules: true
56+
- uses: actions-rs/toolchain@v1
57+
with:
58+
toolchain: nightly
59+
override: true
60+
profile: minimal
61+
components: rustfmt
62+
- uses: actions-rs/cargo@v1
63+
with:
64+
command: fmt
65+
args: -- --check
66+
67+
clippy:
68+
name: lint
69+
runs-on: ubuntu-latest
70+
steps:
71+
- uses: actions/checkout@v2
72+
with:
73+
submodules: true
74+
- uses: actions-rs/toolchain@v1
75+
with:
76+
toolchain: nightly
77+
override: true
78+
profile: minimal
79+
components: clippy, rustfmt
80+
- uses: actions-rs/clippy-check@v1
81+
with:
82+
token: ${{ secrets.GITHUB_TOKEN }}
83+
args: --tests --examples
84+
85+
docs:
86+
name: docs
87+
runs-on: ubuntu-latest
88+
steps:
89+
- uses: actions/checkout@v2
90+
with:
91+
submodules: true
92+
- uses: actions-rs/toolchain@v1
93+
with:
94+
toolchain: stable
95+
override: true
96+
profile: minimal
97+
- uses: actions-rs/cargo@v1
98+
with:
99+
command: doc
100+
args: --no-deps

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ futures = { version = "0.3", default-features = false, features = ["alloc"]}
1313

1414
[dev-dependencies]
1515
async-std = "1.3.0"
16-
futures = { version = "0.3", default-features = true}
16+
futures = "0.3"
1717
tokio = { version = "1.12.0", features = ["rt-multi-thread", "macros"] }
1818

1919
[build-dependencies]

examples/info.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ async fn main() {
2525
match system.info.get_version().await {
2626
Ok(v) => println!("Version received: {:?}", v),
2727
Err(RequestError::MavErr(info::InfoError::Unknown(s))) => {
28-
println!("Unknown MAVLink error ({:?})", s)
28+
println!("Unknown MAVLink error ({:?})", s);
2929
}
3030
Err(RequestError::MavErr(info::InfoError::InformationNotReceivedYet(s))) => {
31-
println!("{}", s)
31+
println!("{}", s);
3232
}
3333
Err(RequestError::RpcErr(rpc_err)) => println!("RPC error: {:?}", rpc_err),
3434
};

src/generated/telemetry/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ impl Into<pb::Covariance> for Covariance {
178178
/// A zero-rotation quaternion is represented by (1,0,0,0).
179179
/// The quaternion could also be written as w + xi + yj + zk.
180180
///
181-
/// For more info see: https://en.wikipedia.org/wiki/Quaternion
181+
/// For more info see: <https://en.wikipedia.org/wiki/Quaternion>
182182
#[derive(Clone, PartialEq, Debug, Default)]
183183
pub struct Quaternion {
184184
/// Quaternion entry 0, also denoted as a

src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![deny(clippy::all)]
2+
13
#[allow(clippy::all)]
24
mod generated;
35

@@ -46,6 +48,7 @@ impl System {
4648

4749
#[tonic::async_trait]
4850
trait Connect {
51+
#[allow(clippy::ptr_arg)]
4952
async fn connect(url: &String) -> Result<Self, tonic::transport::Error>
5053
where
5154
Self: Sized;

0 commit comments

Comments
 (0)