Skip to content

Analyze Compiler Metrics #1

Analyze Compiler Metrics

Analyze Compiler Metrics #1

name: Analyze Compiler Metrics
on:
workflow_dispatch:
jobs:
analyze:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: setup gradle
uses: gradle/gradle-build-action@v2
- name: make gradlew executable
run: chmod +x ./gradlew
- name: generate compose reports
run: ./gradlew assembleRelease -PcomposeCompilerReports=true
- name: navigate to compiler dir
run: cd compiler_metrics
- name: find and analyze
run: |
for file in *-composables.txt; do
grep -oP 'restartable scheme\("\[androidx\.compose\.ui\.UiComposable\]"\) fun \K[A-Za-z0-9_]+\([^)]*' "$file" |
awk -F\( '{print $1}' |
grep -q "unstable" && echo "Found unstable function in $file:"
done