mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
03b824be0b
nightly / beta are not required actions but if they fail then all other builds will be cancelled and so prevent the PR from being cleared as buildable. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
name: Cloud Hypervisor Build
|
|
on: [pull_request, create]
|
|
|
|
jobs:
|
|
build:
|
|
if: github.event_name == 'pull_request'
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
rust:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
target:
|
|
- x86_64-unknown-linux-gnu
|
|
- x86_64-unknown-linux-musl
|
|
steps:
|
|
- name: Code checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Install Rust toolchain (${{ matrix.rust }})
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
target: ${{ matrix.target }}
|
|
override: true
|
|
|
|
- name: Debug Check (default features)
|
|
run: |
|
|
git rev-list origin/master..$GITHUB_SHA | xargs -t -I % sh -c 'git checkout %; cargo check --all --target=${{ matrix.target }}'
|
|
git checkout $GITHUB_SHA
|
|
|
|
- name: Build (acpi,kvm)
|
|
run: cargo rustc --bin cloud-hypervisor --no-default-features --features "acpi,kvm" -- -D warnings
|
|
|
|
- name: Build (kvm)
|
|
run: cargo rustc --bin cloud-hypervisor --no-default-features --features "kvm" -- -D warnings
|
|
|
|
- name: Release Build (default features)
|
|
run: cargo build --all --release --target=${{ matrix.target }}
|