Skip to content

Commit

Permalink
Update python-package.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
zox47 authored Sep 28, 2024
1 parent 8b5a980 commit 5b23163
Showing 1 changed file with 5 additions and 25 deletions.
30 changes: 5 additions & 25 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Publish Android Package
name: Build Native Libs Android Package

on:
push:
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Generate pipgrip.lock
run: |
source .venv/bin/activate
pipgrip $(cat requirements.txt) --lock
pipgrip $(cat requirements.txt) --lock --output-file=pipgrip.lock
- name: Show pipgrip.lock
run: |
Expand All @@ -58,31 +58,11 @@ jobs:
source .venv/bin/activate
pip install -r pipgrip.lock
- name: Set up Android SDK
run: |
mkdir -p $HOME/Android/Sdk/cmdline-tools
wget https://dl.google.com/android/repository/commandlinetools-linux-7302050_latest.zip
unzip commandlinetools-linux-7302050_latest.zip -d $HOME/Android/Sdk/cmdline-tools/
mv $HOME/Android/Sdk/cmdline-tools/cmdline-tools $HOME/Android/Sdk/cmdline-tools/latest
echo "ANDROID_SDK_ROOT=$HOME/Android/Sdk" >> $GITHUB_ENV
echo "SDK_ROOT=$HOME/Android/Sdk" >> $GITHUB_ENV
echo "ANDROID_NDK_HOME=/home/runner/Android/Sdk/ndk/25.2.9519653" >> $GITHUB_ENV
echo "PATH=$PATH:$HOME/Android/Sdk/cmdline-tools/latest/bin:$HOME/Android/Sdk/platform-tools:$ANDROID_NDK_HOME" >> $GITHUB_ENV
yes | $HOME/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --install "platform-tools" "platforms;android-33" "build-tools;33.0.0"
$HOME/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --list
- name: Install Android NDK
run: |
NDK_VERSION="25.2.9519653"
yes | $HOME/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --install "ndk;$NDK_VERSION" --channel=3
- name: Build Android Package
id: build_package
- name: Build Lib Native
id: build_lib_native
run: |
source .venv/bin/activate # Activate virtual environment
p4a create --requirements=$(paste -s -d, pipgrip.lock) --arch arm64-v8a --arch armeabi-v7a --arch x86_64 --sdk-dir $ANDROID_SDK_ROOT --ndk-dir $ANDROID_NDK_HOME --dist-name mydist
p4a create --requirements=$(paste -s -d, pipgrip.lock) --arch arm64-v8a --arch armeabi-v7a --arch x86_64 --dist-name mydist
- name: Zip mydist folder
run: |
Expand Down

0 comments on commit 5b23163

Please sign in to comment.