mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
3c9e97ce00
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
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
|
|
continue-on-error: ${{ matrix.experimental }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
experimental: [false]
|
|
include:
|
|
- rust: beta
|
|
target: x86_64-unknown-linux-gnu
|
|
experimental: true
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install Rust toolchain (${{ matrix.rust }})
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
components: rustfmt, clippy
|
|
|
|
- name: Formatting (rustfmt)
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Clippy (common + kvm)
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings
|
|
|
|
- name: Clippy (default features)
|
|
run: cargo clippy --all --all-targets --tests -- -D warnings
|
|
|
|
- name: Clippy (default features + amx)
|
|
run: cargo clippy --all --all-targets --tests --features "amx" -- -D warnings
|
|
|
|
- name: Clippy (default features + gdb)
|
|
run: cargo clippy --all --all-targets --tests --features "gdb" -- -D warnings
|
|
|
|
- name: Clippy (common + mshv)
|
|
run: cargo clippy --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings
|
|
|
|
- name: Check build did not modify any files
|
|
run: test -z "$(git status --porcelain)"
|