Compare commits

...

4 commits

Author SHA1 Message Date
Peter Cai 0f655f1f1f workflows: Save debug symbols for releases
All checks were successful
/ build-debug (push) Successful in 5m0s
2024-04-29 19:22:30 -04:00
Peter Cai 1f6bad4222 app-unpriv: Set ndkVersion as well for stripping
Otherwise, the stripping step always fails in CI builds. This breaks
reproducibility as debug info contains path to NDK.
2024-04-29 19:22:19 -04:00
Peter Cai 03e6380570 Ditch REPRODUCIBLE_BUILD flag and set all prefix maps unconditionally 2024-04-29 19:22:12 -04:00
Peter Cai bf121e07a4 workflows: Correct build reproducibility
- REPRODUCIBLE_BUILD needs to be a string
- Fetch all history to generate versionCode correctly
2024-04-29 19:22:04 -04:00
4 changed files with 11 additions and 10 deletions

View file

@ -14,6 +14,7 @@ jobs:
uses: https://gitea.angry.im/actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Decode Secret Signing Configuration
uses: https://gitea.angry.im/actions/base64-to-file@v1

View file

@ -2,10 +2,6 @@ on:
push:
tags: '*'
env:
# Enable reproducibility-related build system workarounds
REPRODUCIBLE_BUILD: true
jobs:
release:
runs-on: [docker, android-app-certs]
@ -17,6 +13,7 @@ jobs:
uses: https://gitea.angry.im/actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0
- name: Decode Secret Signing Configuration
uses: https://gitea.angry.im/actions/base64-to-file@v1
@ -37,6 +34,9 @@ jobs:
- name: Build Release APK (Unprivileged / EasyEUICC only)
run: ./gradlew --no-daemon :app-unpriv:assembleRelease
- name: Copy Debug Symbols to Release Path
run: cp app-unpriv/build/outputs/native-debug-symbols/jmpRelease/native-debug-symbols.zip app-unpriv/build/outputs/apk/jmp/release/
- name: Create Release
uses: https://gitea.angry.im/actions/forgejo-release@v1
with:

View file

@ -18,6 +18,7 @@ apply {
android {
namespace = "im.angry.easyeuicc"
compileSdk = 34
ndkVersion = "26.1.10909125"
defaultConfig {
applicationId = "im.angry.easyeuicc"

View file

@ -15,12 +15,11 @@ android {
externalNativeBuild {
ndkBuild {
if (System.getenv("REPRODUCIBLE_BUILD") != "true") {
arguments("-j4")
} else {
arguments("-j1")
cFlags("-fmacro-prefix-map=${project.projectDir.toString()}=/fake/path/")
}
cFlags(
"-fmacro-prefix-map=${project.projectDir.toString()}=/fake/path/",
"-fdebug-prefix-map=${project.projectDir.toString()}=/fake/path/",
"-ffile-prefix-map=${project.projectDir.toString()}=/fake/path/"
)
}
}
}