From babece08c6ad7862279640990e56af8493cf76c7 Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Tue, 19 Apr 2022 10:15:46 +0000 Subject: [PATCH] github: use --locked in cargo invocations Cargo comes with a --locked option that makes sure Cargo.lock is not changed. Signed-off-by: Wei Liu --- .github/workflows/build.yaml | 14 +++++++------- .github/workflows/quality.yaml | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3751d439b..87fe30e1b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -39,25 +39,25 @@ jobs: git checkout $GITHUB_SHA - name: Build (default features) - run: cargo rustc --bin cloud-hypervisor -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor -- -D warnings - name: Build (common + kvm) - run: cargo rustc --bin cloud-hypervisor --no-default-features --features "common,kvm" -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "common,kvm" -- -D warnings - name: Build (default features + tdx) - run: cargo rustc --bin cloud-hypervisor --features "tdx" -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor --features "tdx" -- -D warnings - name: Build (default features + amx) - run: cargo rustc --bin cloud-hypervisor --features "amx" -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor --features "amx" -- -D warnings - name: Build (default features + gdb) - run: cargo rustc --bin cloud-hypervisor --features "gdb" -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor --features "gdb" -- -D warnings - name: Build (common + mshv) - run: cargo rustc --bin cloud-hypervisor --no-default-features --features "common,mshv" -- -D warnings + run: cargo rustc --locked --bin cloud-hypervisor --no-default-features --features "common,mshv" -- -D warnings - name: Release Build (default features) - run: cargo build --all --release --target=${{ matrix.target }} + run: cargo build --locked --all --release --target=${{ matrix.target }} - name: Check build did not modify any files run: test -z "$(git status --porcelain)" diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index d167d0791..1a7b760ff 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -34,19 +34,19 @@ jobs: run: cargo fmt -- --check - name: Clippy (common + kvm) - run: cargo clippy --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings + run: cargo clippy --locked --all --all-targets --no-default-features --tests --features "common,kvm" -- -D warnings - name: Clippy (default features) - run: cargo clippy --all --all-targets --tests -- -D warnings + run: cargo clippy --locked --all --all-targets --tests -- -D warnings - name: Clippy (default features + amx) - run: cargo clippy --all --all-targets --tests --features "amx" -- -D warnings + run: cargo clippy --locked --all --all-targets --tests --features "amx" -- -D warnings - name: Clippy (default features + gdb) - run: cargo clippy --all --all-targets --tests --features "gdb" -- -D warnings + run: cargo clippy --locked --all --all-targets --tests --features "gdb" -- -D warnings - name: Clippy (common + mshv) - run: cargo clippy --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings + run: cargo clippy --locked --all --all-targets --no-default-features --tests --features "common,mshv" -- -D warnings - name: Check build did not modify any files run: test -z "$(git status --porcelain)"