diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9589a1098..3dc70b126 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -18,6 +18,9 @@ jobs: steps: - name: Code checkout uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install Rust toolchain (${{ matrix.rust }}) uses: actions-rs/toolchain@v1 with: @@ -26,7 +29,9 @@ jobs: override: true - name: Debug Build (default features) - run: cargo build --all --target=${{ matrix.target }} + run: | + git rev-list origin/master..$GITHUB_SHA | xargs -t -I % sh -c 'git checkout %; cargo build --all --target=${{ matrix.target }}' + git checkout $GITHUB_SHA - name: Build (pci,acpi,kvm) run: cargo rustc --bin cloud-hypervisor --no-default-features --features "pci,acpi,kvm" -- -D warnings