-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add workflow to verify crate packaging (#650)
* Add workflow to verify crate packaging Signed-off-by: Daniel Carl Jones <[email protected]> * Fix indentation of workflow Signed-off-by: Daniel Carl Jones <[email protected]> --------- Signed-off-by: Daniel Carl Jones <[email protected]>
- Loading branch information
1 parent
099638e
commit cc20c75
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Crate checks | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
merge_group: | ||
types: [ "checks_requested" ] | ||
|
||
jobs: | ||
verify-crate: | ||
name: Verify crate | ||
runs-on: ubuntu-22.04 | ||
|
||
strategy: | ||
matrix: | ||
crate: | ||
- mountpoint-s3-client | ||
- mountpoint-s3-crt | ||
- mountpoint-s3-crt-sys | ||
|
||
steps: | ||
- name: Checkout code | ||
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 }} | ||
- name: Verify compressed crate size is smaller than crates.io limit | ||
run: | | ||
ls -alh target/package/*.crate | ||
test `cat target/package/*.crate | wc -c` -le 10485760 |