Last active
June 16, 2023 06:02
-
-
Save bastionkid/acd9fc36312328aab8dc343a0cb79319 to your computer and use it in GitHub Desktop.
Size Metrics workflow with only size_diff_report job
This file contains hidden or 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
name: Size Metrics | |
... | |
# content is omitted as it's already shown earlier | |
... | |
env: | |
size_diff_report_file: apk_size_diff_report.html | |
jobs: | |
build: | |
... | |
# content is omitted as it's already shown earlier | |
... | |
size_diff_report: | |
needs: build | |
name: Size Report | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1 | |
- uses: actions/checkout@v3 | |
# Step 2 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.build.outputs.head_short_sha }}.apk | |
# Step 3 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: ${{ needs.build.outputs.base_short_sha }}.apk | |
# Step 4 | |
# here we use our custom python script to generate file matching size_diff_report_file | |
- name: Generate size report | |
run: | | |
chmod +x ./.github/scripts/compare_apks.py | |
python3 ./.github/scripts/compare_apks.py ${{ needs.build.outputs.base_short_sha }} ${{ needs.build.outputs.head_short_sha }} | |
# Step 5 | |
- name: Upload Size Report html file | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.size_diff_report_file }} | |
path: ${{ env.size_diff_report_file }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment