From ac32b1e35f348f57b6ab6ff36f41b98f5f73f4b5 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Wed, 7 Oct 2020 09:10:27 +0000 Subject: [PATCH] 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 --- .github/workflows/build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3dc70b126..7e52c277f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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)