2020-08-13 11:00:48 +00:00
|
|
|
name: Cloud Hypervisor Quality Checks
|
|
|
|
on: [pull_request, create]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
if: github.event_name == 'pull_request'
|
|
|
|
name: Quality (clippy, rustfmt)
|
|
|
|
runs-on: ubuntu-latest
|
2021-03-26 13:55:48 +00:00
|
|
|
continue-on-error: ${{ matrix.experimental }}
|
2020-08-13 11:00:48 +00:00
|
|
|
strategy:
|
2021-03-26 13:55:48 +00:00
|
|
|
fail-fast: false
|
2020-08-13 11:00:48 +00:00
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
target:
|
|
|
|
- x86_64-unknown-linux-gnu
|
2021-03-26 13:55:48 +00:00
|
|
|
experimental: [false]
|
|
|
|
include:
|
|
|
|
- rust: beta
|
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
|
experimental: true
|
2020-08-13 11:00:48 +00:00
|
|
|
steps:
|
|
|
|
- name: Code checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Install Rust toolchain (${{ matrix.rust }})
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
2020-12-08 17:39:06 +00:00
|
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
override: true
|
|
|
|
components: rustfmt, clippy
|
|
|
|
|
2020-08-13 11:00:48 +00:00
|
|
|
- name: Formatting (rustfmt)
|
|
|
|
run: cargo fmt -- --check
|
|
|
|
|
2022-03-28 10:19:09 +00:00
|
|
|
- name: Clippy (common + kvm)
|
2022-04-19 10:15:46 +00:00
|
|
|
run: cargo clippy --locked --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings
|
2020-12-08 17:39:06 +00:00
|
|
|
|
2022-03-28 10:19:09 +00:00
|
|
|
- name: Clippy (default features)
|
2022-04-19 10:15:46 +00:00
|
|
|
run: cargo clippy --locked --all --all-targets --tests -- -D warnings
|
2021-01-25 11:14:26 +00:00
|
|
|
|
2022-03-28 10:19:09 +00:00
|
|
|
- name: Clippy (default features + amx)
|
2022-04-19 10:15:46 +00:00
|
|
|
run: cargo clippy --locked --all --all-targets --tests --features "amx" -- -D warnings
|
2022-03-25 18:53:21 +00:00
|
|
|
|
2022-03-28 10:22:08 +00:00
|
|
|
- name: Clippy (default features + gdb)
|
2022-04-19 10:15:46 +00:00
|
|
|
run: cargo clippy --locked --all --all-targets --tests --features "gdb" -- -D warnings
|
2022-03-28 10:22:08 +00:00
|
|
|
|
2022-03-28 10:19:09 +00:00
|
|
|
- name: Clippy (common + mshv)
|
2022-04-19 10:15:46 +00:00
|
|
|
run: cargo clippy --locked --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings
|
2021-06-18 14:52:49 +00:00
|
|
|
|
|
|
|
- name: Check build did not modify any files
|
|
|
|
run: test -z "$(git status --porcelain)"
|