Skip to content

Commit

Permalink
Prevent build on crate verify workflow (#685)
Browse files Browse the repository at this point in the history
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 <djonesoa@amazon.com>
  • Loading branch information
dannycjones authored Jan 3, 2024
1 parent 45414a2 commit 5e41487
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5e41487

Please sign in to comment.