2023-02-27 03:20:20 +08:00
|
|
|
name: Rust checks
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-08-24 22:37:15 +08:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-27 03:20:20 +08:00
|
|
|
- name: cargo fmt
|
2023-08-13 21:20:48 +08:00
|
|
|
run: cargo fmt --check --all
|
2023-02-27 03:20:20 +08:00
|
|
|
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-08-24 22:37:15 +08:00
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
2023-02-27 03:20:20 +08:00
|
|
|
- name: Install deps
|
|
|
|
run: |
|
|
|
|
sudo apt install gettext libncurses5-dev libpcre2-dev python3-pip tmux
|
|
|
|
sudo pip3 install pexpect
|
|
|
|
- name: cmake
|
|
|
|
run: |
|
|
|
|
cmake -B build
|
|
|
|
- name: cargo clippy
|
2023-08-13 21:20:48 +08:00
|
|
|
run: cargo clippy --workspace --all-targets -- --deny=warnings
|