Xiaomi Runner Config
Some checks failed
Android Build (Xiaomi) / build-android (push) Failing after 2m1s
Some checks failed
Android Build (Xiaomi) / build-android (push) Failing after 2m1s
This commit is contained in:
@@ -4,42 +4,62 @@ on: [push]
|
|||||||
jobs:
|
jobs:
|
||||||
build-android:
|
build-android:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
# Wir wechseln auf ein Standard-Image, das stabil erreichbar ist
|
||||||
container:
|
container:
|
||||||
# Dieses Image ist der "Goldstandard" für Tauri-Android-Builds
|
image: node:20-bookworm
|
||||||
image: ghcr.io/beartocode/tauri-android-docker:latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Node.js
|
- name: Install System Dependencies
|
||||||
uses: actions/setup-node@v4
|
|
||||||
with:
|
|
||||||
node-version: 20
|
|
||||||
# Caching für npm spart viel Zeit
|
|
||||||
cache: "npm"
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
run: |
|
||||||
npm install
|
apt-get update
|
||||||
|
apt-get install -y \
|
||||||
|
build-essential \
|
||||||
|
curl \
|
||||||
|
wget \
|
||||||
|
file \
|
||||||
|
libssl-dev \
|
||||||
|
pkg-config \
|
||||||
|
openjdk-17-jdk \
|
||||||
|
git
|
||||||
|
|
||||||
|
- name: Install Rust
|
||||||
|
run: |
|
||||||
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
rustup target add aarch64-linux-android
|
rustup target add aarch64-linux-android
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
run: |
|
||||||
|
mkdir -p /opt/android-sdk/cmdline-tools
|
||||||
|
cd /opt/android-sdk/cmdline-tools
|
||||||
|
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
|
||||||
|
unzip *.zip
|
||||||
|
mv cmdline-tools latest
|
||||||
|
cd ..
|
||||||
|
yes | ./cmdline-tools/latest/bin/sdkmanager --sdk_root=/opt/android-sdk "platform-tools" "platforms;android-33" "build-tools;33.0.1" "ndk;25.1.8937393"
|
||||||
|
echo "ANDROID_HOME=/opt/android-sdk" >> $GITHUB_ENV
|
||||||
|
echo "NDK_HOME=/opt/android-sdk/ndk/25.1.8937393" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Install Node Dependencies
|
||||||
|
run: npm install
|
||||||
|
|
||||||
- name: Build Android APK
|
- name: Build Android APK
|
||||||
run: |
|
run: |
|
||||||
# Falls der Android-Ordner fehlt, initialisieren
|
|
||||||
if [ ! -d "src-tauri/gen/android" ]; then
|
if [ ! -d "src-tauri/gen/android" ]; then
|
||||||
npx tauri android init
|
npx tauri android init
|
||||||
fi
|
fi
|
||||||
# Build für 64-bit ARM (Dein Xiaomi Redmi Note 14 Pro 5G)
|
# Wichtig: PATH für Rust setzen, falls nicht erkannt
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
npx tauri android build --target aarch64
|
npx tauri android build --target aarch64
|
||||||
env:
|
env:
|
||||||
# Wir nutzen die im Docker-Image vorinstallierten SDKs
|
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
|
||||||
NDK_HOME: /opt/android-sdk/ndk/25.1.8937393
|
|
||||||
ANDROID_HOME: /opt/android-sdk
|
|
||||||
|
|
||||||
- name: Upload APK Artifact
|
- name: Upload APK Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: Xiaomi-Release-APK
|
name: Xiaomi-Release-APK
|
||||||
# Pfad zur fertigen APK
|
|
||||||
path: src-tauri/gen/android/app/build/outputs/apk/release/*.apk
|
path: src-tauri/gen/android/app/build/outputs/apk/release/*.apk
|
||||||
|
|||||||
Reference in New Issue
Block a user