mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-11-05 11:31:14 +00:00
cff190fa5f
Signed-off-by: Michael Zhao <michael.zhao@arm.com>
62 lines
1.8 KiB
YAML
62 lines
1.8 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:
|
|
- aarch64-unknown-linux-gnu
|
|
experimental: [false]
|
|
include:
|
|
- rust: beta
|
|
target: aarch64-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 (kvm)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
use-cross: true
|
|
command: clippy
|
|
args: --target=${{ matrix.target }} --all --no-default-features --features "kvm" -- -D warnings
|
|
|
|
- name: Clippy (kvm,acpi)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
use-cross: true
|
|
command: clippy
|
|
args: --target=${{ matrix.target }} --all --no-default-features --features "kvm,acpi" -- -D warnings
|
|
|
|
- name: Clippy (all features,kvm)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
use-cross: true
|
|
command: clippy
|
|
args: --target=${{ matrix.target }} --all --no-default-features --features "common,kvm" -- -D warnings
|
|
|
|
- name: Clippy (default)
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
use-cross: true
|
|
command: clippy
|
|
args: --target=${{ matrix.target }} --all -- -D warnings
|