Xiaomi Runner Config
Some checks failed
Android Build (Xiaomi) / build-android (push) Failing after 55s
Some checks failed
Android Build (Xiaomi) / build-android (push) Failing after 55s
This commit is contained in:
@@ -4,7 +4,6 @@ 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:
|
||||||
image: node:20-bookworm
|
image: node:20-bookworm
|
||||||
|
|
||||||
@@ -23,37 +22,47 @@ jobs:
|
|||||||
libssl-dev \
|
libssl-dev \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
openjdk-17-jdk \
|
openjdk-17-jdk \
|
||||||
git
|
git \
|
||||||
|
unzip # Fehlte im letzten Log
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
run: |
|
run: |
|
||||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||||
|
# Pfad für nachfolgende Schritte setzen
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
# Pfad für diesen aktuellen Schritt aktiv setzen
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
rustup target add aarch64-linux-android
|
rustup target add aarch64-linux-android
|
||||||
|
|
||||||
- name: Setup Android SDK
|
- name: Setup Android SDK
|
||||||
run: |
|
run: |
|
||||||
mkdir -p /opt/android-sdk/cmdline-tools
|
# Wir nutzen das Home-Verzeichnis, um Permission-Errors zu vermeiden
|
||||||
cd /opt/android-sdk/cmdline-tools
|
export ANDROID_HOME=$HOME/android-sdk
|
||||||
|
mkdir -p $ANDROID_HOME/cmdline-tools
|
||||||
|
cd $ANDROID_HOME/cmdline-tools
|
||||||
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
|
wget https://dl.google.com/android/repository/commandlinetools-linux-9477386_latest.zip
|
||||||
unzip *.zip
|
unzip *.zip # Jetzt mit installiertem unzip
|
||||||
mv cmdline-tools latest
|
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"
|
# Lizenzen akzeptieren und Pakete installieren
|
||||||
echo "ANDROID_HOME=/opt/android-sdk" >> $GITHUB_ENV
|
yes | ./latest/bin/sdkmanager --sdk_root=$ANDROID_HOME "platform-tools" "platforms;android-33" "build-tools;33.0.1" "ndk;25.1.8937393"
|
||||||
echo "NDK_HOME=/opt/android-sdk/ndk/25.1.8937393" >> $GITHUB_ENV
|
|
||||||
|
# Variablen für Gitea Actions speichern
|
||||||
|
echo "ANDROID_HOME=$ANDROID_HOME" >> $GITHUB_ENV
|
||||||
|
echo "NDK_HOME=$ANDROID_HOME/ndk/25.1.8937393" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Node Dependencies
|
- name: Install Node Dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Build Android APK
|
- name: Build Android APK
|
||||||
run: |
|
run: |
|
||||||
|
# Sicherstellen, dass Rust im Pfad ist
|
||||||
|
export PATH="$HOME/.cargo/bin:$PATH"
|
||||||
|
|
||||||
if [ ! -d "src-tauri/gen/android" ]; then
|
if [ ! -d "src-tauri/gen/android" ]; then
|
||||||
npx tauri android init
|
npx tauri android init
|
||||||
fi
|
fi
|
||||||
# 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:
|
||||||
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
|
JAVA_HOME: /usr/lib/jvm/java-17-openjdk-amd64
|
||||||
|
|||||||
Reference in New Issue
Block a user