Skip to content

Commit

Permalink
Merge pull request #17 from slowli/misc-chores
Browse files Browse the repository at this point in the history
- Configure Dependabot PR groups
- Commit workspace lockfile
- Update Rust-related actions in CI config
- Lint dependency tree using cargo-deny
  • Loading branch information
slowli authored Sep 17, 2023
2 parents d44e078 + 4df0394 commit 0b21bac
Show file tree
Hide file tree
Showing 9 changed files with 471 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .clippy.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Minimum supported Rust version. Should be consistent with CI and mentions
# in crate READMEs.
msrv = "1.60"
msrv = "1.66"
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ updates:
schedule:
interval: daily
time: "03:00"
groups:
dev-dependencies:
dependency-type: "development"
minor-changes:
update-types:
- "minor"
- "patch"
open-pull-requests-limit: 10
assignees:
- slowli
77 changes: 20 additions & 57 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ on:

env:
# Minimum supported Rust version.
msrv: 1.60.0
msrv: 1.66.0
# Nightly Rust necessary for the no-std job.
nightly: nightly-2023-04-29
nightly: nightly-2023-09-09

jobs:
build-msrv:
Expand All @@ -20,14 +20,9 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.msrv }}
override: true
- name: Generate lockfile
uses: actions-rs/cargo@v1
with:
command: generate-lockfile

- name: Cache cargo build
uses: actions/cache@v3
Expand All @@ -37,15 +32,9 @@ jobs:
restore-keys: ${{ runner.os }}-msrv-cargo

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-targets
run: cargo test --workspace --all-targets
- name: Run doc tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --doc
run: cargo test --workspace --doc

build:
runs-on: ubuntu-latest
Expand All @@ -54,15 +43,15 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Generate lockfile
uses: actions-rs/cargo@v1
- name: Install cargo-deny
uses: baptiste0928/cargo-install@v2
with:
command: generate-lockfile
crate: cargo-deny
version: "^0.14"

- name: Cache cargo build
uses: actions/cache@v3
Expand All @@ -72,27 +61,16 @@ jobs:
restore-keys: ${{ runner.os }}-cargo

- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
name: "Clippy"
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-targets -- -D warnings
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Check dependencies
run: cargo deny check

- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-targets
run: cargo test --workspace --all-targets
- name: Run doc tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --doc
run: cargo test --workspace --doc

# Checks that the crate actually builds without `std`. To do this,
# we take a target (`thumbv7m-none-eabi`) that does not have `std` support.
Expand All @@ -105,16 +83,10 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.nightly }}
profile: minimal
override: true
target: thumbv7m-none-eabi
- name: Generate lockfile
uses: actions-rs/cargo@v1
with:
command: generate-lockfile
targets: thumbv7m-none-eabi

- name: Cache cargo build
uses: actions/cache@v3
Expand All @@ -124,10 +96,7 @@ jobs:
restore-keys: ${{ runner.os }}-nostd-cargo

- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --lib --target thumbv7m-none-eabi -Z avoid-dev-deps
run: cargo build --lib --target thumbv7m-none-eabi -Z avoid-dev-deps

document:
if: github.event_name == 'push'
Expand All @@ -141,15 +110,9 @@ jobs:
- uses: actions/checkout@v3

- name: Install Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
profile: minimal
override: true
- name: Generate lockfile
uses: actions-rs/cargo@v1
with:
command: generate-lockfile

- name: Cache cargo build
uses: actions/cache@v3
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Rust
/target
Cargo.lock

# IDE
/.idea
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html)

### Changed

- Bump MSRV to 1.60.
- Bump MSRV to 1.66.

## 0.3.0 - 2022-11-01

Expand Down
Loading

0 comments on commit 0b21bac

Please sign in to comment.