ci: use cargo check to validate building commits

The purpose of that step is to make sure each commit builds. The `check`
command is much faster for that purpose.

On my 32-core machine `cargo check --all` takes around 25 seconds while
`cargo build --all` takes around 35 seconds, so that's quite a bit of
time saving there.

Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
Wei Liu 2020-10-07 09:10:27 +00:00 committed by Sebastien Boeuf
parent 67025948dc
commit ac32b1e35f

View File

@ -28,9 +28,9 @@ jobs:
target: ${{ matrix.target }}
override: true
- name: Debug Build (default features)
- name: Debug Check (default features)
run: |
git rev-list origin/master..$GITHUB_SHA | xargs -t -I % sh -c 'git checkout %; cargo build --all --target=${{ matrix.target }}'
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 (pci,acpi,kvm)