From c49c55b2c33c4a3efc978505b8855657c7799152 Mon Sep 17 00:00:00 2001 From: Boshen Date: Thu, 30 May 2024 21:18:20 +0800 Subject: [PATCH] ci: clean up the `bloat` action --- .github/workflows/bloat.tmpl | 13 ------------- .github/workflows/bloat.yml | 23 ++++++++++++++--------- 2 files changed, 14 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/bloat.tmpl diff --git a/.github/workflows/bloat.tmpl b/.github/workflows/bloat.tmpl deleted file mode 100644 index c334ff0dae8418..00000000000000 --- a/.github/workflows/bloat.tmpl +++ /dev/null @@ -1,13 +0,0 @@ -# Bloat Summary - -## Largest functions - -``` -${BLOAT_FUNC} -``` - -## Largest crates - -``` -${BLOAT_CRATE} -``` diff --git a/.github/workflows/bloat.yml b/.github/workflows/bloat.yml index 0b9297fb452fac..f4ad6a7b9a4ffe 100644 --- a/.github/workflows/bloat.yml +++ b/.github/workflows/bloat.yml @@ -14,16 +14,12 @@ jobs: name: Cargo Bloat runs-on: ubuntu-latest steps: - - name: Checkout - uses: taiki-e/checkout-action@v1 + - uses: taiki-e/checkout-action@v1 - - name: Cache - uses: Swatinem/rust-cache@v2 - - - name: Install cargo-bloat - uses: taiki-e/install-action@v2 + - uses: Boshen/setup-rust@main with: - tool: cargo-bloat + cache-key: warm + tools: cargo-bloat - name: Run run: | @@ -40,4 +36,13 @@ jobs: echo "${BLOAT_CRATE}" # Render summary - envsubst < .github/workflows/bloat.tmpl > $GITHUB_STEP_SUMMARY + echo "# Bloat Summary" >> $GITHUB_STEP_SUMMARY + echo "## Largest functions" >> $GITHUB_STEP_SUMMARY + echo "```" >> $GITHUB_STEP_SUMMARY + echo "${BLOAT_FUNC}" >> $GITHUB_STEP_SUMMARY + echo "```" >> $GITHUB_STEP_SUMMARY + echo "## Largest crates" >> $GITHUB_STEP_SUMMARY + echo "```" >> $GITHUB_STEP_SUMMARY + echo "${BLOAT_CRATE}" >> $GITHUB_STEP_SUMMARY + echo "```" >> $GITHUB_STEP_SUMMARY +