From c96c8b29f809d826dd024e5749bd740b5f2a906c Mon Sep 17 00:00:00 2001 From: Ben Frankel Date: Thu, 5 Sep 2024 19:41:37 -0700 Subject: [PATCH 1/2] Add `--locked` to workflow cargo commands --- .github/workflows/ci.yaml | 8 ++++---- .github/workflows/release.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 723980d..ffeeeac 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -34,9 +34,9 @@ jobs: - name: Run tests run: | - cargo test --workspace --all-features --all-targets + cargo test --locked --workspace --all-features --all-targets # Workaround for https://github.com/rust-lang/cargo/issues/6669 - cargo test --workspace --all-features --doc + cargo test --locked --workspace --all-features --doc # Run clippy lints. clippy: @@ -61,7 +61,7 @@ jobs: sweep-cache: true - name: Run clippy lints - run: cargo clippy --workspace --all-targets --all-features -- --deny warnings + run: cargo clippy --locked --workspace --all-targets --all-features -- --deny warnings # Check formatting. format: @@ -101,4 +101,4 @@ jobs: sweep-cache: true - name: Check documentation - run: cargo doc --workspace --all-features --document-private-items --no-deps + run: cargo doc --locked --workspace --all-features --document-private-items --no-deps diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 51a9bce..3169940 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -173,7 +173,7 @@ jobs: if: ${{ matrix.platform != 'web' }} run: | for target in ${{ matrix.targets }}; do - cargo build --profile='${{ matrix.profile }}' --target="${target}" --no-default-features --features='${{ matrix.features }}' + cargo build --locked --profile='${{ matrix.profile }}' --target="${target}" --no-default-features --features='${{ matrix.features }}' mv target/"${target}"/'${{ matrix.profile }}/${{ env.cargo_build_binary_name }}${{ matrix.binary_ext }}' tmp/binary/"${target}"'${{ matrix.binary_ext }}' done From 83193e333e43ae2270b92849a2cbe7a917ad2fb5 Mon Sep 17 00:00:00 2001 From: Ben Frankel Date: Thu, 5 Sep 2024 19:43:25 -0700 Subject: [PATCH 2/2] Lock trunk as well --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3169940..2f189eb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -167,7 +167,7 @@ jobs: if: ${{ matrix.platform == 'web' }} run: | cargo binstall --no-confirm trunk wasm-bindgen-cli wasm-opt - trunk build --release --dist '${{ env.app }}' + trunk build --locked --release --dist '${{ env.app }}' - name: Build binaries (non-Web) if: ${{ matrix.platform != 'web' }}