Skip to content

Commit 40dfc36

Browse files
authored
Merge pull request #95 from eldruin/switch-to-ghmq
Switch to GHMQ
2 parents a0d986b + b79942e commit 40dfc36

File tree

6 files changed

+38
-61
lines changed

6 files changed

+38
-61
lines changed

.github/bors.toml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
on:
2-
push:
3-
branches: [ staging, trying, master ]
4-
pull_request:
2+
push: # Run CI for all branches except GitHub merge queue tmp branches
3+
branches-ignore:
4+
- "gh-readonly-queue/**"
5+
pull_request: # Run CI for PRs on any branch
6+
merge_group: # Run CI for the GitHub merge queue
57

68
name: Continuous integration
79

@@ -13,37 +15,30 @@ jobs:
1315
strategy:
1416
fail-fast: false
1517
matrix:
16-
# All generated code should be running on stable now
1718
rust: [stable]
18-
19-
# The default target we're compiling on and for
20-
TARGET: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf]
19+
target: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf]
20+
features:
21+
- ''
22+
- 'async-tokio,gpio_cdev,gpio_sysfs,i2c,spi'
2123

2224
include:
23-
# Test MSRV
24-
- rust: 1.60.0
25-
TARGET: x86_64-unknown-linux-gnu
25+
- rust: 1.60.0 # MSRV
26+
target: x86_64-unknown-linux-gnu
2627

2728
# Test nightly but don't fail
2829
- rust: nightly
2930
experimental: true
30-
TARGET: x86_64-unknown-linux-gnu
31+
target: x86_64-unknown-linux-gnu
3132

3233
steps:
33-
- uses: actions/checkout@v2
34-
35-
- uses: actions-rs/toolchain@v1
34+
- uses: actions/checkout@v4
35+
- uses: dtolnay/rust-toolchain@master
3636
with:
37-
profile: minimal
3837
toolchain: ${{ matrix.rust }}
39-
target: ${{ matrix.TARGET }}
40-
override: true
38+
target: ${{ matrix.target }}
4139

4240
- name: Install armv7 libraries
43-
if: ${{ matrix.TARGET == 'armv7-unknown-linux-gnueabihf' }}
41+
if: ${{ matrix.target == 'armv7-unknown-linux-gnueabihf' }}
4442
run: sudo apt-get install -y libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
4543

46-
- uses: actions-rs/cargo@v1
47-
with:
48-
command: check
49-
args: --target=${{ matrix.TARGET }}
44+
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}

.github/workflows/clippy.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
on:
2-
push:
3-
branches: [ staging, trying, master ]
4-
pull_request:
2+
push: # Run CI for all branches except GitHub merge queue tmp branches
3+
branches-ignore:
4+
- "gh-readonly-queue/**"
5+
pull_request: # Run CI for PRs on any branch
6+
merge_group: # Run CI for the GitHub merge queue
57

68
name: Clippy check
79
jobs:
810
clippy_check:
911
runs-on: ubuntu-latest
1012
steps:
11-
- uses: actions/checkout@v2
12-
- uses: actions-rs/toolchain@v1
13+
- uses: actions/checkout@v4
14+
- uses: dtolnay/rust-toolchain@master
1315
with:
14-
profile: minimal
1516
toolchain: stable
16-
override: true
1717
components: clippy
18-
- uses: actions-rs/clippy-check@v1
19-
with:
20-
token: ${{ secrets.GITHUB_TOKEN }}
18+
- run: cargo clippy --all-features -- --deny=warnings

.github/workflows/rustfmt.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,19 @@
11
on:
2-
push:
3-
branches: [ staging, trying, master ]
4-
pull_request:
2+
push: # Run CI for all branches except GitHub merge queue tmp branches
3+
branches-ignore:
4+
- "gh-readonly-queue/**"
5+
pull_request: # Run CI for PRs on any branch
6+
merge_group: # Run CI for the GitHub merge queue
57

68
name: Code formatting check
79

810
jobs:
911
fmt:
10-
name: Rustfmt
1112
runs-on: ubuntu-latest
1213
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions-rs/toolchain@v1
14+
- uses: actions/checkout@v4
15+
- uses: dtolnay/rust-toolchain@master
1516
with:
16-
profile: minimal
17-
toolchain: stable
18-
override: true
17+
toolchain: nightly
1918
components: rustfmt
20-
- uses: actions-rs/cargo@v1
21-
with:
22-
command: fmt
23-
args: --all -- --check
19+
- run: cargo fmt --check

src/serial.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ impl std::error::Error for SerialError {}
8383
impl embedded_hal::serial::Error for SerialError {
8484
fn kind(&self) -> embedded_hal::serial::ErrorKind {
8585
use embedded_hal::serial::ErrorKind::*;
86-
match &self.err {
87-
// TODO: match any errors here if we can find any that are relevant
88-
_ => Other,
89-
}
86+
// TODO: match any errors here if we can find any that are relevant
87+
Other
9088
}
9189
}
9290

src/spi.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,8 @@ impl From<io::Error> for SPIError {
165165
impl embedded_hal::spi::Error for SPIError {
166166
fn kind(&self) -> embedded_hal::spi::ErrorKind {
167167
use embedded_hal::spi::ErrorKind;
168-
match self.err.kind() {
169-
// TODO: match any errors here if we can find any that are relevant
170-
_ => ErrorKind::Other,
171-
}
168+
// TODO: match any errors here if we can find any that are relevant
169+
ErrorKind::Other
172170
}
173171
}
174172

0 commit comments

Comments
 (0)