Xiaomi Runner Config
Some checks failed
Android Build Final / build-android (push) Failing after 8m39s
Some checks failed
Android Build Final / build-android (push) Failing after 8m39s
This commit is contained in:
@@ -1,34 +1,29 @@
|
||||
name: Android Build Cargo Final
|
||||
name: Android Build Final
|
||||
on: [push]
|
||||
|
||||
# Wir pinnen den Runner auf deinen Projektpfad aus den Logs
|
||||
defaults:
|
||||
run:
|
||||
working-directory: Bytemalte/marstemedia
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
# Wir nehmen wieder das Node-Image, weil der Gitea-Checkout Node braucht.
|
||||
# Wir installieren Rust einfach schnell darin.
|
||||
container:
|
||||
# Wir nutzen ein Rust-Image als Basis, da du kein Node brauchst
|
||||
image: rust:1.75-bookworm
|
||||
image: node:20-bookworm
|
||||
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
path: "."
|
||||
|
||||
- name: Install System Dependencies
|
||||
- name: Install System & Rust
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -y build-essential curl wget file libssl-dev pkg-config openjdk-17-jdk git unzip libgtk-3-dev webkit2gtk-4.1 libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev python3
|
||||
|
||||
- name: Setup Rust Target
|
||||
run: |
|
||||
# Rust installieren
|
||||
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
|
||||
# Installiert das Tauri CLI direkt über Cargo
|
||||
cargo install tauri-cli
|
||||
# Trunk & Tauri-CLI installieren
|
||||
cargo install trunk tauri-cli
|
||||
|
||||
- name: Setup Android SDK
|
||||
run: |
|
||||
@@ -45,14 +40,23 @@ jobs:
|
||||
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
||||
echo "NDK_HOME=$ANDROID_HOME/ndk/25.1.8937393" >> $GITHUB_ENV
|
||||
|
||||
- name: Build Android APK (Cargo)
|
||||
- name: Build Android APK
|
||||
run: |
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
export NDK_HOME=$HOME/android-sdk/ndk/25.1.8937393
|
||||
# Initialisierung falls nötig
|
||||
|
||||
# Da dein Repo in Bytemalte/marstemedia liegt:
|
||||
cd Bytemalte/marstemedia || echo "Schon im richtigen Verzeichnis"
|
||||
|
||||
# 1. Frontend bauen (wichtig für Tauri!)
|
||||
trunk build --release
|
||||
|
||||
# 2. Android initialisieren falls nötig
|
||||
if [ ! -d "src-tauri/gen/android" ]; then
|
||||
cargo tauri android init
|
||||
fi
|
||||
# Der eigentliche Build für dein Xiaomi
|
||||
|
||||
# 3. APK bauen
|
||||
cargo tauri android build --target aarch64
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
|
||||
@@ -60,5 +64,5 @@ jobs:
|
||||
- name: Upload APK Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Xiaomi-App-Cargo
|
||||
path: "src-tauri/gen/android/app/build/outputs/apk/release/*.apk"
|
||||
name: Xiaomi-App
|
||||
path: "**/src-tauri/gen/android/app/build/outputs/apk/release/*.apk"
|
||||
|
||||
Reference in New Issue
Block a user