mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
40 lines
1 KiB
YAML
40 lines
1 KiB
YAML
# Run `cargo bloat` for finding out what takes most of the space in your executable.
|
|
|
|
name: Cargo Bloat
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_QUIET: true
|
|
|
|
jobs:
|
|
bloat:
|
|
name: Cargo Bloat
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Install cargo-bloat
|
|
run: cargo install cargo-bloat --no-default-features
|
|
|
|
- name: Run
|
|
run: |
|
|
# Get largest functions
|
|
export BLOAT_FUNC=$(cargo bloat --profile release-debug --bin oxc_cli -n 10)
|
|
echo "$BLOAT_FUNC"
|
|
|
|
# Get largest crates
|
|
export BLOAT_CRATE=$(cargo bloat --profile release-debug --bin oxc_cli --crates -n 10)
|
|
echo "$BLOAT_CRATE"
|
|
|
|
# Get longest compile time
|
|
export BLOAT_TIME=$(cargo bloat --profile release-debug --bin oxc_cli --time -j 1)
|
|
echo "$BLOAT_TIME"
|
|
|
|
# Render summary
|
|
envsubst < .github/workflows/bloat.tmpl > $GITHUB_STEP_SUMMARY
|