rework
This commit is contained in:
parent
d8fa028ff8
commit
00f6aa3cf0
|
@ -12,7 +12,7 @@ jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set rust version
|
- name: Set rust version
|
||||||
run: |
|
run: |
|
||||||
|
@ -30,36 +30,29 @@ jobs:
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev
|
sudo apt-get install -y libudev-dev libssl-dev libsasl2-dev libzstd-dev
|
||||||
|
|
||||||
- uses: actions/cache@v2
|
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
||||||
|
- uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
~/.cargo/registry/
|
~/.cargo/registry/index/
|
||||||
~/.cargo/git/
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
target/
|
target/
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- uses: actions-rs/toolchain@v1
|
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.RUST_STABLE }}
|
toolchain: ${{ env.RUST_STABLE }}
|
||||||
override: true
|
|
||||||
profile: minimal
|
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
# avoid the default "-D warnings"
|
||||||
|
rustflags: ""
|
||||||
|
|
||||||
- name: cargo fmt
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: --all -- --check
|
|
||||||
|
|
||||||
- name: cargo clippy
|
- name: Run fmt+clippy
|
||||||
uses: actions-rs/cargo@v1
|
run: |
|
||||||
with:
|
cargo fmt --all --check
|
||||||
command: clippy
|
cargo clippy --workspace --all-targets
|
||||||
args: --workspace --all-targets #-- --deny=warnings
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Reference in New Issue