2020-08-23 06:46:22 +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:
|
|
|
|
- aarch64-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: Install arm64 libfdt
|
2021-02-22 16:45:22 +00:00
|
|
|
run: wget http://ftp.us.debian.org/debian/pool/main/d/device-tree-compiler/libfdt-dev_1.6.0-1_arm64.deb && dpkg-deb -xv libfdt-dev_1.6.0-1_arm64.deb ./tlibfdtdev && mkdir -p target/debug/deps && sudo cp ./tlibfdtdev/usr/lib/aarch64-linux-gnu/libfdt.a target/debug/deps/libfdt.a && echo "libfdt installed"
|
2020-08-23 06:46:22 +00:00
|
|
|
- name: Formatting (rustfmt)
|
|
|
|
run: cargo fmt -- --check
|
2020-10-15 12:15:41 +00:00
|
|
|
- name: Clippy (kvm)
|
2020-08-23 06:46:22 +00:00
|
|
|
uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
use-cross: true
|
|
|
|
command: clippy
|
2020-10-15 12:15:41 +00:00
|
|
|
args: --target=${{ matrix.target }} --no-default-features --features "kvm" -- -D warnings
|