Cargo Bloat #22
Workflow file for this run
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
# Run `cargo bloat` for finding out what takes most of the space in your executable. | |
name: Cargo Bloat | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
bloat: | |
name: Cargo Bloat | |
runs-on: ubuntu-latest | |
steps: | |
- uses: taiki-e/checkout-action@v1 | |
- uses: Boshen/setup-rust@main | |
with: | |
cache-key: warm | |
tools: cargo-bloat | |
- name: Run | |
env: | |
RUSTFLAGS: "-C debuginfo=2 -C strip=none" | |
shell: bash | |
run: | | |
touch GITHUB_STEP_SUMMARY | |
echo "# Bloat Summary" >> GITHUB_STEP_SUMMARY | |
echo "" >> GITHUB_STEP_SUMMARY | |
echo "## Largest functions" >> GITHUB_STEP_SUMMARY | |
echo "```" >> GITHUB_STEP_SUMMARY | |
echo "" >> GITHUB_STEP_SUMMARY | |
cargo bloat --release -p oxlint --features allocator -n 15 >> GITHUB_STEP_SUMMARY | |
echo "" >> GITHUB_STEP_SUMMARY | |
echo "```" >> GITHUB_STEP_SUMMARY | |
echo "## Largest crates" >> GITHUB_STEP_SUMMARY | |
echo "```" >> GITHUB_STEP_SUMMARY | |
echo "" >> GITHUB_STEP_SUMMARY | |
`cargo bloat --release -p oxlint --features allocator --crates -n 15` >> GITHUB_STEP_SUMMARY | |
echo "" >> GITHUB_STEP_SUMMARY | |
echo "```" >> GITHUB_STEP_SUMMARY | |
eat GITHUB_STEP_SUMMARY > $GITHUB_STEP_SUMMARY |