mirror of
https://github.com/kata-containers/cgroups-rs.git
synced 2026-08-05 02:13:23 +00:00
Got the following error in the clippy: error: this expression borrows a reference (`&str`) that is immediately dereferenced by the compiler --> tests/cpuset.rs:54:37 | 54 | let r = cpuset.set_cpus(&cpus); | ^^^^^ help: change this to: `cpus` | = note: `-D clippy::needless-borrow` implied by `-D warnings` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow But we did not touch the code, just becuase the clippy rules was updated follow the rust update. To avoid this problem we lock the rust version in CI and make it steady. Signed-off-by: Tim Zhang <tim@hyper.sh>
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: BVT
|
|
on: [pull_request]
|
|
env:
|
|
RUST_VERSION: 1.52
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }}
|
|
- run: make debug
|
|
|
|
fmt:
|
|
name: Format Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }}
|
|
- run: rustup component add rustfmt
|
|
- run: make fmt
|
|
clippy:
|
|
name: Clippy Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }}
|
|
- run: rustup component add clippy
|
|
- run: make clippy
|
|
test:
|
|
name: Run Unit Test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- run: rustup install ${{ env.RUST_VERSION }} && rustup default ${{ env.RUST_VERSION }}
|
|
- run: make test
|
|
|
|
|