Skip to content
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
25 changes: 25 additions & 0 deletions .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Rust formatting check
on:
pull_request:
branches: ["*"]
paths:
- "**/*.rs"
permissions:
contents: read
pull-requests: write
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
submodules: recursive
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt

- name: Run rustfmt check
id: fmt
run: cargo fmt --all --manifest-path Cargo.toml --check
40 changes: 26 additions & 14 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,39 @@
name: Lint
name: Rust Linting

on:
push:
branches:
- master
paths:
- "**.rs"
- "Cargo.toml"
pull_request:
branches:
- master
paths:
- 'src/**'
- 'Cargo.toml'
- "**.rs"
- "Cargo.toml"

permissions:
contents: read
pull-requests: write

jobs:
lint:
name: Lint code base
runs-on: ubuntu-latest
permissions:
contents: 'read'
checks: 'write'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Check out Git repository
uses: actions/checkout@v4
with:
submodules: recursive
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Install dependencies
run: sudo apt -q -yy install libdbus-1-dev pkg-config libdbus-1-3 libsystemd0 libsystemd-dev

- name: rust-clippy-check
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
- name: rust-fmt-check
uses: actions-rust-lang/rustfmt@v1
uses: actions-rs/clippy-check@v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --manifest-path Cargo.toml
24 changes: 12 additions & 12 deletions .github/workflows/nix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ on:
branches:
- master
paths:
- 'flake.nix'
- 'flake.lock'
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/nix.yml'
- "flake.nix"
- "flake.lock"
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/nix.yml"
pull_request:
branches:
- master
paths:
- 'flake.nix'
- 'flake.lock'
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/nix.yml'
- "flake.nix"
- "flake.lock"
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/nix.yml"

jobs:
build:
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on:
branches:
- master
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/rust.yml"
pull_request:
branches:
- master
paths:
- 'src/**'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust.yml'
- "src/**"
- "Cargo.toml"
- "Cargo.lock"
- ".github/workflows/rust.yml"

env:
CARGO_TERM_COLOR: always
Expand All @@ -27,7 +27,7 @@ jobs:
strategy:
fail-fast: false
matrix:
rust: [latest, 1.86.0, 1.77.2]
rust: [latest, 1.88.0]

steps:
- name: Checkout code
Expand Down
Loading
Loading