Skip to content

Commit

Permalink
chore Cargo - Set rust-version & add matrix for building and testing …
Browse files Browse the repository at this point in the history
…in MSRV

Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Nov 22, 2024
1 parent cad9505 commit dc223a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,25 @@ jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check

build-test:
runs-on: ubuntu-latest
strategy:
matrix:
# Always run MSRV too!
rust: ["stable", "1.76"]
features: ['log', 'defmt-log', '""']
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --no-default-features --features ${{matrix.features}} --verbose
- name: Run Tests
Expand Down
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ readme = "README.md"
repository = "https://github.com/rust-embedded-community/embedded-sdmmc-rs"
version = "0.8.0"

# Make sure to update the CI too!
rust-version = "1.76"

[dependencies]
byteorder = {version = "1", default-features = false}
defmt = {version = "0.3", optional = true}
Expand Down

0 comments on commit dc223a1

Please sign in to comment.