Compare commits
2 Commits
e2c12615c5
...
c58cc0cf46
| Author | SHA1 | Date | |
|---|---|---|---|
| c58cc0cf46 | |||
| 8938e3fdba |
@ -60,16 +60,24 @@ jobs:
|
|||||||
cargo test
|
cargo test
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
build:
|
# Fast per-commit Android compile check. This does NOT build a shippable APK:
|
||||||
name: Build Android APK
|
# the full signed release APK is built only on tag pushes by build-release.yml
|
||||||
|
# (which runs sync-android-sources.sh + signing). Running the full bundle here
|
||||||
|
# too would duplicate a ~15min build and, without the sync step, produced an
|
||||||
|
# unsigned APK missing our custom sources/icons/proguard rules anyway.
|
||||||
|
# `cargo check` for the Android target (~1min) catches Android-specific Rust
|
||||||
|
# breakage without linking, bundling, or signing.
|
||||||
|
android-check:
|
||||||
|
name: Android Compile Check
|
||||||
runs-on: linux/amd64
|
runs-on: linux/amd64
|
||||||
needs: test
|
needs: test
|
||||||
container:
|
container:
|
||||||
image: gitea.tourolle.paris/dtourolle/jellytau-builder:latest
|
image: gitea.tourolle.paris/dtourolle/jellytau-builder:latest
|
||||||
env:
|
env:
|
||||||
ANDROID_HOME: /opt/android-sdk
|
ANDROID_HOME: /opt/android-sdk
|
||||||
NDK_VERSION: 27.0.11902837
|
ANDROID_SDK_ROOT: /opt/android-sdk
|
||||||
NDK_HOME: /opt/android-sdk/ndk/27.0.11902837
|
NDK_HOME: /opt/android-sdk/ndk/27.0.11902837
|
||||||
|
ANDROID_NDK_HOME: /opt/android-sdk/ndk/27.0.11902837
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -97,42 +105,13 @@ jobs:
|
|||||||
${{ runner.os }}-bun-
|
${{ runner.os }}-bun-
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: bun install
|
||||||
bun install
|
|
||||||
|
|
||||||
- name: Build frontend
|
- name: Cargo check (aarch64-linux-android)
|
||||||
run: bun run build
|
|
||||||
|
|
||||||
- name: Ensure Android NDK
|
|
||||||
run: |
|
|
||||||
if [ ! -d "$NDK_HOME" ]; then
|
|
||||||
echo "NDK not found at $NDK_HOME, installing ndk;$NDK_VERSION"
|
|
||||||
yes | "$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$ANDROID_HOME" "ndk;$NDK_VERSION"
|
|
||||||
fi
|
|
||||||
echo "Using NDK at $NDK_HOME"
|
|
||||||
ls "$NDK_HOME"
|
|
||||||
|
|
||||||
- name: Initialize Android project
|
|
||||||
run: |
|
run: |
|
||||||
|
TC="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin"
|
||||||
|
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$TC/aarch64-linux-android24-clang"
|
||||||
|
export CC_aarch64_linux_android="$TC/aarch64-linux-android24-clang"
|
||||||
|
export AR_aarch64_linux_android="$TC/llvm-ar"
|
||||||
cd src-tauri
|
cd src-tauri
|
||||||
echo "" | bunx tauri android init
|
cargo check --target aarch64-linux-android --lib
|
||||||
cd ..
|
|
||||||
|
|
||||||
- name: Build Android APK
|
|
||||||
id: build
|
|
||||||
run: |
|
|
||||||
mkdir -p artifacts
|
|
||||||
bun run tauri android build --apk true --target aarch64
|
|
||||||
|
|
||||||
# Find the generated APK file
|
|
||||||
ARTIFACT=$(find src-tauri/gen/android/app/build/outputs/apk -name "*.apk" -type f -print -quit)
|
|
||||||
echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT
|
|
||||||
echo "Found artifact: ${ARTIFACT}"
|
|
||||||
|
|
||||||
- name: Upload build artifact
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: jellytau-apk
|
|
||||||
path: ${{ steps.build.outputs.artifact }}
|
|
||||||
retention-days: 30
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|||||||
@ -65,6 +65,11 @@ if [ -d "$RES_SRC" ]; then
|
|||||||
cp "$dir"/* "$RES_DST/$name/"
|
cp "$dir"/* "$RES_DST/$name/"
|
||||||
echo " Copied res: $name"
|
echo " Copied res: $name"
|
||||||
done
|
done
|
||||||
|
# We ship only the color adaptive icon (background + foreground). Drop any
|
||||||
|
# monochrome layer Tauri may generate: the themed-icon monochrome doesn't
|
||||||
|
# render well, and our adaptive-icon xml no longer references it, so a stray
|
||||||
|
# ic_launcher_monochrome.png would just be dead weight.
|
||||||
|
rm -f "$RES_DST"/mipmap-*/ic_launcher_monochrome.png
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✓ Android sources synced successfully"
|
echo "✓ Android sources synced successfully"
|
||||||
|
|||||||
@ -2,5 +2,4 @@
|
|||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||||
<monochrome android:drawable="@mipmap/ic_launcher_monochrome"/>
|
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.7 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 32 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 60 KiB |
Loading…
x
Reference in New Issue
Block a user