mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 20:32:10 +00:00
* ci: try strip symbols from std * ci: add cargo-unused * ci(bloat): fix the command stripping debug symbol from std is not working with nightly + target
40 lines
988 B
YAML
40 lines
988 B
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: |
|
|
export CMD="cargo bloat --profile release-debug --bin oxc_cli"
|
|
|
|
# Get largest functions
|
|
export BLOAT_FUNC_CMD="${CMD} -n 10"
|
|
export BLOAT_FUNC=`${BLOAT_FUNC_CMD}`
|
|
echo "${BLOAT_FUNC}"
|
|
|
|
# Get largest crates
|
|
export BLOAT_CRATE_CMD="${CMD} --crates -n 10"
|
|
export BLOAT_CRATE=`${BLOAT_CRATE_CMD}`
|
|
echo "${BLOAT_CRATE}"
|
|
|
|
# Render summary
|
|
envsubst < .github/workflows/bloat.tmpl > $GITHUB_STEP_SUMMARY
|