Files
MapLibreParticleLab/.github/workflows/pr-bloaty.yml
2023-10-17 14:55:30 +02:00

70 lines
2.2 KiB
YAML

name: pr-bloaty
on:
workflow_run:
workflows: [linux-ci]
types:
- completed
env:
# built with commit d38709084a9865fe0bb8300aec70ebf8243b3d43
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
jobs:
pr-bloaty:
runs-on: ubuntu-22.04
steps:
- uses: ./.github/actions/download-workflow-run-artifact
with:
artifact-name: mbgl-render
expect-files: "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"
# because Google is not making a release...
# https://github.com/google/bloaty/issues/334
- name: Compile Bloaty
run: |
git clone https://github.com/google/bloaty.git
cmake -B bloaty/build -G Ninja -S bloaty
cmake --build bloaty/build
- 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 legacy
run: bloaty/build/bloaty mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits > tlus_diff_legacy.txt
- name: Run Bloaty McBloatface on main
run: bloaty/build/bloaty mbgl-render -- mbgl-render-main -n 0 -s vm -d compileunits > tlus_diff_main.txt
- name: Prepare Bloaty message
run: |
{
echo "# Bloaty Results 🐋"
echo '<details><summary>Compared to d38709084a9865fe0bb8300aec70ebf8243b3d43</summary>'
echo '```'
cat tlus_diff_legacy.txt
echo '```</details>'
echo '<details><summary>Compared to main</summary>'
echo '```'
cat tlus_diff_main.txt
echo '```</details>'
} >> message.md
- name: Leave a comment with Bloaty results
uses: marocchino/sticky-pull-request-comment@v2
with:
header: bloaty
path: message.md