-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 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,39 @@ | ||
name: Rust (cargo bloat, musl) | ||
|
||
"on": | ||
workflow_dispatch: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUSTFLAGS: -D warnings | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
cargo-bloat-version: | ||
- "0.11.0" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: cargo version | ||
run: cargo --version | ||
- name: add target x86_64-unknown-linux-musl | ||
run: rustup target add x86_64-unknown-linux-musl | ||
- name: install cargo-bloat (v${{ matrix.cargo-bloat-version }}) | ||
run: cargo install cargo-bloat --version ${{ matrix.cargo-bloat-version }} | ||
- name: cargo bloat --time (release) | ||
run: cargo bloat --profile=release-cargo-bloat --time --jobs 1 --target x86_64-unknown-linux-musl | ||
- name: cargo bloat (display, release) | ||
run: cargo bloat --profile=release-cargo-bloat --target x86_64-unknown-linux-musl | ||
- name: cargo bloat (display, per-crate, release) | ||
run: cargo bloat --profile=release-cargo-bloat --crates --target x86_64-unknown-linux-musl | ||
- name: cargo bloat (testing, release) | ||
# Size <= 1MiB? | ||
run: cargo bloat --profile=release-cargo-bloat --message-format json --target x86_64-unknown-linux-musl | jq --exit-status '."file-size" <= 1048576' |