mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-01 17:35:19 +00:00
build: Use GitHub actions for clippy/build/rustfmt tests
Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
aa57762c4f
commit
a4b67c2226
14
.github/workflows/build.yaml
vendored
14
.github/workflows/build.yaml
vendored
@ -25,5 +25,17 @@ jobs:
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
|
||||
- name: Build
|
||||
- name: Debug Build (default features)
|
||||
run: cargo build --all --target=${{ matrix.target }}
|
||||
|
||||
- name: Build (pci,acpi,kvm)
|
||||
run: cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,acpi,kvm" -- -D warnings
|
||||
|
||||
- name: Build (pci,kvm)
|
||||
run: cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,kvm" -- -D warnings
|
||||
|
||||
- name: Build (mmio,kvm)
|
||||
run: cargo rustc --bin cloud-hypervisor --no-default-features --features "mmio,kvm" -- -D warnings
|
||||
|
||||
- name: Release Build (default features)
|
||||
run: cargo build --all --release --target=${{ matrix.target }}
|
||||
|
39
.github/workflows/quality.yaml
vendored
Normal file
39
.github/workflows/quality.yaml
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
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:
|
||||
toolchain: ${{ matrix.rust }}
|
||||
target: ${{ matrix.target }}
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: Formatting (rustfmt)
|
||||
run: cargo fmt -- --check
|
||||
|
||||
- name: Clippy (all features)
|
||||
run: cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
- name: Clippy (pci,acpi,kvm)
|
||||
run: cargo clippy --all-targets --no-default-features --features "pci,acpi,kvm" -- -D warnings
|
||||
|
||||
- name: Clippy (pci,kvm)
|
||||
run: cargo clippy --all-targets --no-default-features --features "pci,kvm" -- -D warnings
|
||||
|
||||
- name: Clippy (mmio,kvm)
|
||||
run: cargo clippy --all-targets --no-default-features --features "mmio,kvm" -- -D warnings
|
Loading…
x
Reference in New Issue
Block a user