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
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust:
|
|
|
|
- stable
|
|
|
|
target:
|
|
|
|
- x86_64-unknown-linux-gnu
|
|
|
|
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
|
|
|
|
|
2020-12-08 17:39:06 +00:00
|
|
|
- name: Clippy (all features,kvm)
|
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings
|
|
|
|
|
|
|
|
- name: Clippy (all features,mshv)
|
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings
|
|
|
|
|
2020-10-15 12:15:41 +00:00
|
|
|
- name: Clippy (acpi,kvm)
|
2020-11-25 16:39:08 +00:00
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "acpi,kvm" -- -D warnings
|
2020-12-08 17:39:06 +00:00
|
|
|
|
2020-10-15 12:15:41 +00:00
|
|
|
- name: Clippy (kvm)
|
2020-11-25 16:39:08 +00:00
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "kvm" -- -D warnings
|
2020-12-08 17:39:06 +00:00
|
|
|
|
|
|
|
- name: Clippy (acpi,mshv)
|
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "acpi,mshv" -- -D warnings
|
|
|
|
|
|
|
|
- name: Clippy (mshv)
|
|
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "mshv" -- -D warnings
|
2021-01-25 11:14:26 +00:00
|
|
|
|
|
|
|
- name: Clippy (integration tests)
|
|
|
|
run: cargo clippy --all --all-targets --tests --features "integration_tests" -- -D warnings
|