From 899d9ff774fa78cc0ab98a906ad5319d768d61b3 Mon Sep 17 00:00:00 2001 From: Bart Louwers Date: Tue, 17 Oct 2023 13:51:46 +0200 Subject: [PATCH] Use RelWithDebInfo with Bloaty McBloatface (size test) (#1766) --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/pr-bloaty.yml | 28 +++++++++++++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index f269e4dfc..25159d164 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -97,7 +97,7 @@ jobs: - name: Build mbgl-render if: matrix.renderer == 'drawable' run: | - cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build-size -GNinja -DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMLN_DRAWABLE_RENDERER=ON -DCMAKE_CXX_FLAGS="-Oz -g" + cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -B build-size -GNinja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DMLN_DRAWABLE_RENDERER=ON cmake --build build-size --target mbgl-render - name: Upload mbgl-render diff --git a/.github/workflows/pr-bloaty.yml b/.github/workflows/pr-bloaty.yml index 0655d1bce..149880a3a 100644 --- a/.github/workflows/pr-bloaty.yml +++ b/.github/workflows/pr-bloaty.yml @@ -9,8 +9,8 @@ on: - completed env: # built with commit d38709084a9865fe0bb8300aec70ebf8243b3d43 - # in the future we should probably use whatever was built last in main - legacy_download_url: https://maplibre-native.s3.eu-central-1.amazonaws.com/mbgl-render + legacy_download_url: https://maplibre-native.s3.eu-central-1.amazonaws.com/mbgl-render-legacy + main_download_url: https://maplibre-native.s3.eu-central-1.amazonaws.com/mbgl-render-main permissions: pull-requests: write @@ -19,30 +19,40 @@ jobs: pr-bloaty: runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/download-workflow-run-artifact with: artifact-name: mbgl-render expect-files: "mbgl-render" - - name: Download old mbgl-render + - name: Download legacy and main mbgl-render run: | wget -O mbgl-render-legacy "$legacy_download_url" + wget -O mbgl-render-main "$main_download_url" - - name: Run Bloaty McBloatface on an ELF file + - name: Run Bloaty McBloatface on legacy uses: carlosperate/bloaty-action@v1 + id: bloaty-legacy with: - bloaty-args: mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits > tlus_diff.txt + bloaty-args: mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits + + - name: Run Bloaty McBloatface on main + uses: carlosperate/bloaty-action@v1 + id: bloaty-main + with: + bloaty-args: mbgl-render -- mbgl-render-main -n 0 -s vm -d compileunits - name: Prepare Bloaty message run: | { echo "# Bloaty Results 🐋" - echo "" + echo '
Compared to d38709084a9865fe0bb8300aec70ebf8243b3d43' echo '```' - cat tlus_diff.txt + ${{ steps.bloaty-legacy.outputs.bloaty-output }} + echo '```
' + echo '
Compared to main' echo '```' + ${{ steps.bloaty-main.outputs.bloaty-output }} + echo '```
' } >> message.md - name: Leave a comment with Bloaty results