Abrarul8541 commited on
Commit
fe40eb1
·
verified ·
1 Parent(s): f9e02d4

Phase 0/5: CI build with APK size gate

Browse files
Files changed (1) hide show
  1. .github/workflows/build.yml +20 -0
.github/workflows/build.yml ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: build
2
+ on: [push, workflow_dispatch]
3
+ jobs:
4
+ apk:
5
+ runs-on: ubuntu-latest
6
+ steps:
7
+ - uses: actions/checkout@v4
8
+ - uses: actions/setup-java@v4
9
+ with: { distribution: temurin, java-version: 17 }
10
+ - uses: android-actions/setup-android@v3
11
+ - uses: gradle/actions/setup-gradle@v4
12
+ with: { gradle-version: "8.9" }
13
+ - run: gradle :app:assembleDebug :app:testDebugUnitTest
14
+ - name: Size gate (15 MB)
15
+ run: |
16
+ f=$(ls app/build/outputs/apk/debug/*.apk | head -1)
17
+ s=$(stat -c%s "$f"); echo "APK size: $s"
18
+ [ "$s" -lt 15728640 ] || { echo "APK exceeds 15 MB"; exit 1; }
19
+ - uses: actions/upload-artifact@v4
20
+ with: { name: apk, path: app/build/outputs/apk/debug/*.apk }