From 5e41487a27fce641f3f07fbab1dae50ee56ec2d2 Mon Sep 17 00:00:00 2001 From: Daniel Carl Jones Date: Wed, 3 Jan 2024 15:35:31 +0000 Subject: [PATCH] Prevent build on crate verify workflow (#685) This prevents issues where some of the crates are updated but not published yet. Cargo tries to build the crate using the version of its dependency on crates.io, as if its about to be published. In many cases, we want to update our crates over a few commits before later publishing each of the crates together. Example of the issue: https://github.com/awslabs/mountpoint-s3/actions/runs/7356232845/job/20026056240?pr=684#step:5:229 Signed-off-by: Daniel Carl Jones --- .github/workflows/crates.yml | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/.github/workflows/crates.yml b/.github/workflows/crates.yml index e65545a83..22c47e52e 100644 --- a/.github/workflows/crates.yml +++ b/.github/workflows/crates.yml @@ -25,23 +25,14 @@ jobs: uses: actions/checkout@v3 with: submodules: true - - name: Cargo cache - uses: actions/cache@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: cargo-${{ runner.os }}-${{ github.job }}-${{ hashFiles('**/Cargo.lock') }} - name: Set up stable Rust uses: actions-rs/toolchain@v1 with: toolchain: stable override: true - name: Package ${{ matrix.crate }} crate - run: cargo package -p ${{ matrix.crate }} + # `--no-verify` avoids building using crates.io dependencies, which for local packages may not be updated yet + run: cargo package -p ${{ matrix.crate }} --no-verify - name: Verify compressed crate size is smaller than crates.io limit run: | ls -alh target/package/*.crate