Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to GHMQ #95

Merged
merged 2 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/bors.toml

This file was deleted.

39 changes: 17 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
on:
push:
branches: [ staging, trying, master ]
pull_request:
push: # Run CI for all branches except GitHub merge queue tmp branches
branches-ignore:
- "gh-readonly-queue/**"
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue

name: Continuous integration

Expand All @@ -13,37 +15,30 @@ jobs:
strategy:
fail-fast: false
matrix:
# All generated code should be running on stable now
rust: [stable]

# The default target we're compiling on and for
TARGET: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf]
target: [x86_64-unknown-linux-gnu, armv7-unknown-linux-gnueabihf]
features:
- ''
- 'async-tokio,gpio_cdev,gpio_sysfs,i2c,spi'

include:
# Test MSRV
- rust: 1.60.0
TARGET: x86_64-unknown-linux-gnu
- rust: 1.60.0 # MSRV
target: x86_64-unknown-linux-gnu

# Test nightly but don't fail
- rust: nightly
experimental: true
TARGET: x86_64-unknown-linux-gnu
target: x86_64-unknown-linux-gnu

steps:
- uses: actions/checkout@v2

- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.TARGET }}
override: true
target: ${{ matrix.target }}

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

- uses: actions-rs/cargo@v1
with:
command: check
args: --target=${{ matrix.TARGET }}
- run: cargo check --target=${{ matrix.target }} --features=${{ matrix.features }}
18 changes: 8 additions & 10 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
on:
push:
branches: [ staging, trying, master ]
pull_request:
push: # Run CI for all branches except GitHub merge queue tmp branches
branches-ignore:
- "gh-readonly-queue/**"
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue

name: Clippy check
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo clippy --all-features -- --deny=warnings
22 changes: 9 additions & 13 deletions .github/workflows/rustfmt.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
on:
push:
branches: [ staging, trying, master ]
pull_request:
push: # Run CI for all branches except GitHub merge queue tmp branches
branches-ignore:
- "gh-readonly-queue/**"
pull_request: # Run CI for PRs on any branch
merge_group: # Run CI for the GitHub merge queue

name: Code formatting check

jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: stable
override: true
toolchain: nightly
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --check
6 changes: 2 additions & 4 deletions src/serial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ impl std::error::Error for SerialError {}
impl embedded_hal::serial::Error for SerialError {
fn kind(&self) -> embedded_hal::serial::ErrorKind {
use embedded_hal::serial::ErrorKind::*;
match &self.err {
// TODO: match any errors here if we can find any that are relevant
_ => Other,
}
// TODO: match any errors here if we can find any that are relevant
Other
}
}

Expand Down
6 changes: 2 additions & 4 deletions src/spi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,8 @@ impl From<io::Error> for SPIError {
impl embedded_hal::spi::Error for SPIError {
fn kind(&self) -> embedded_hal::spi::ErrorKind {
use embedded_hal::spi::ErrorKind;
match self.err.kind() {
// TODO: match any errors here if we can find any that are relevant
_ => ErrorKind::Other,
}
// TODO: match any errors here if we can find any that are relevant
ErrorKind::Other
}
}

Expand Down