smalltalk-matrix/.github/workflows/check_size.yml

49 lines
1.4 KiB
YAML
Raw Permalink Normal View History

2022-03-15 22:15:17 +01:00
name: Check Size
on:
pull_request:
jobs:
2022-03-15 22:15:17 +01:00
check-size:
name: Check Size
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
2022-12-11 22:24:09 +01:00
- uses: actions/checkout@v3
2022-11-28 20:09:53 +01:00
with:
submodules: 'recursive'
2022-12-11 22:24:15 +01:00
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- uses: gradle/gradle-build-action@v2
2022-03-15 22:15:17 +01:00
- name: Fetch bundletool
run: |
2022-03-15 22:56:14 +01:00
curl -s -L https://github.com/google/bundletool/releases/download/1.9.0/bundletool-all-1.9.0.jar --create-dirs -o bin/bundletool.jar
chmod +x bin/bundletool.jar
echo "#!/bin/bash" >> bin/bundletool
echo 'java -jar $(dirname "$0")/bundletool.jar "$@"' >> bin/bundletool
2022-03-15 22:15:17 +01:00
chmod +x bin/bundletool
echo "$(pwd)/bin" >> $GITHUB_PATH
- name: Save Size
env:
PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
run: |
mkdir -p ./apk_size
echo $(./tools/check-size.sh | tail -1 | cut -d ',' -f2-) > ./apk_size/size.txt
echo $PULL_REQUEST_NUMBER > ./apk_size/pr_number.txt
- uses: actions/upload-artifact@v3
with:
name: apk-size
path: |
apk_size/size.txt
apk_size/pr_number.txt
retention-days: 5