-
-
Notifications
You must be signed in to change notification settings - Fork 21
71 lines (60 loc) · 2 KB
/
Copy pathreproducible-build.yml
File metadata and controls
71 lines (60 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: Reproducible Build
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
verify-reproducible:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6.0.3
- name: Set up Java
uses: actions/setup-java@v5.2.0
with:
distribution: temurin
java-version: 17
- name: Set up Android SDK
uses: android-actions/setup-android@v4
- name: Install SDK components
run: |
sdkmanager "platforms;android-34" "build-tools;34.0.0"
- name: Build release APK (first)
run: |
./gradlew clean :app:assembleRelease \
-PskipSigning \
--no-daemon \
--max-workers=1 \
-Dorg.gradle.parallel=false
mkdir -p build/unsigned
cp app/build/outputs/apk/release/*universal-release.apk build/unsigned/build1.apk
- name: Clean and build release APK (second)
run: |
./gradlew clean :app:assembleRelease \
-PskipSigning \
--no-daemon \
--max-workers=1 \
-Dorg.gradle.parallel=false
mkdir -p build/unsigned
cp app/build/outputs/apk/release/*universal-release.apk build/unsigned/build2.apk
- name: Install verification tools
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends diffoscope
- name: Compare APKs
run: |
cmp -s build/unsigned/build1.apk build/unsigned/build2.apk
echo "Reproducible build verification passed (APKs are identical)."
- name: diffoscope report on failure
if: failure()
continue-on-error: true
run: diffoscope build/unsigned/build1.apk build/unsigned/build2.apk > diffoscope.txt || true
- name: Upload diffoscope report
if: failure()
uses: actions/upload-artifact@v7
with:
name: diffoscope-report
path: diffoscope.txt
retention-days: 7