fix reproducable builds
This commit is contained in:
parent
8b2702c444
commit
c523f5b492
1 changed files with 21 additions and 1 deletions
22
.github/workflows/android.yml
vendored
22
.github/workflows/android.yml
vendored
|
|
@ -15,6 +15,7 @@ jobs:
|
|||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Lix GHA Installer Action
|
||||
uses: samueldr/lix-gha-installer-action@v2026-02-22
|
||||
|
|
@ -26,11 +27,30 @@ jobs:
|
|||
env:
|
||||
KEYSTORE_CONTENT: ${{ secrets.KEYSTORE_CONTENT }}
|
||||
|
||||
# The NDK's path ends up in the native libraries' build IDs, so put it where F-Droid has it.
|
||||
# It's copied rather than linked, as clang finds its headers from its resolved location.
|
||||
- name: Set up Android SDK
|
||||
run: |
|
||||
ndk=$(nix develop --command printenv ANDROID_NDK_HOME)
|
||||
sudo mkdir -p /opt/android-sdk/ndk
|
||||
sudo chown -R "$USER" /opt/android-sdk
|
||||
for entry in "${ndk%/ndk/*}"/*; do
|
||||
[[ $entry == */ndk ]] || ln -s "$entry" /opt/android-sdk/
|
||||
done
|
||||
cp -rL "$ndk" /opt/android-sdk/ndk/
|
||||
|
||||
- name: Build app
|
||||
run: |
|
||||
export PUB_CACHE=$PWD/.pub-cache
|
||||
export GOTOOLCHAIN=go$(sed -n -E 's/^toolchain go([0-9.]+)$/\1/p' gomuks/go.mod)
|
||||
nix develop --command bash -c "flutter pub get --enforce-lockfile && bash scripts/build_avif_native.sh && dart scripts/generate.dart && flutter pub run build_runner build && flutter build apk --target-platform android-arm64 --split-per-abi --dart-define=GIT_COMMIT=${{ github.sha }}"
|
||||
nix develop --command bash -c '
|
||||
set -e
|
||||
export ANDROID_HOME=/opt/android-sdk ANDROID_SDK_ROOT=/opt/android-sdk ANDROID_NDK_HOME=/opt/android-sdk/ndk/${ANDROID_NDK_HOME##*/}
|
||||
flutter pub get --enforce-lockfile
|
||||
bash scripts/build_avif_native.sh
|
||||
dart scripts/generate.dart
|
||||
flutter pub run build_runner build
|
||||
flutter build apk --target-platform android-arm64 --split-per-abi --dart-define=GIT_COMMIT=$GITHUB_SHA'
|
||||
env:
|
||||
KEYSTORE_PATH: ../../keystore.jks
|
||||
KEYSTORE_PASSWORD: ${{ secrets.KEYSTORE_PASSWORD }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue