Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci builds #44

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 9 additions & 36 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,21 @@ on:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
# every 1st day of the month at 10:30
- cron: '30 10 1 * *'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

# used to cache dependencies with a timeout
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
shell: bash

- name: Cache Buildozer global directory
uses: actions/cache@v3
- uses: actions/checkout@v4
- name: Build APK
uses: digreatbrian/buildozer-action@v2
with:
path: .buildozer_global
key: buildozer-global-${{ hashFiles('buildozer.spec') }} # Replace with your path

- uses: actions/cache@v3
with:
path: .buildozer
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}

- name: Build with Buildozer
run: |
pip3 install --user --upgrade buildozer Cython virtualenv
export PATH=$PATH:~/.local/bin/
export APP_ANDROID_ACCEPT_SDK_LICENSE=1
export BUILDOZER_WARN_ON_ROOT=0
sudo apt update
sudo apt install -y git zip unzip openjdk-17-jdk python3-pip autoconf libtool pkg-config zlib1g-dev libncurses5-dev libncursesw5-dev libtinfo5 cmake libffi-dev libssl-dev
cd ${{ github.workspace }}
buildozer android debug
python-version: 3.8
buildozer-cmd: buildozer -v android debug

- name: Upload artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: package
path: bin/*.apk
path: ./bin/*.apk
1 change: 1 addition & 0 deletions android/extra_manifest_application_arguments.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android:requestLegacyExternalStorage="true"
26 changes: 13 additions & 13 deletions buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ version = 0.1

# (list) Application requirements
# comma seperated e.g. requirements = sqlite3,kivy
requirements = kivy, android
requirements = python3, kivy, android, soupsieve, beautifulsoup4

# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
Expand Down Expand Up @@ -65,10 +65,10 @@ orientation = portrait
# author = © Copyright Info

# change the major version of python used by the app
osx.python_version = 3
osx.python_version = 3.8

# Kivy version to use
# osx.kivy_version = 1.9.1
osx.kivy_version = 2.3.0

#
# Android specific
Expand All @@ -85,19 +85,16 @@ fullscreen = 0
#android.presplash_color = #FFFFFF

# (int) Android API to use
# android.api = 30
android.api = 34

# (int) Minimum API required
#android.minapi = 9

# (int) Android SDK version to use
#android.sdk = 20
android.minapi = 26

# (str) Android NDK version to use
# android.ndk = 25
android.ndk = 25b

# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True
# android.private_storage = True

# (str) Android NDK directory (if empty, it will be automatically downloaded.)
#android.ndk_path =
Expand Down Expand Up @@ -144,14 +141,16 @@ fullscreen = 0
#android.gradle_dependencies =

# (str) python-for-android branch to use, defaults to stable
p4a.branch = master
p4a.branch = release-2024.01.21

# (str) XML file to include as an intent filters in <activity> tag
#android.manifest.intent_filters =

# (str) launchMode to set for the main activity
android.manifest.launch_mode = standard

android.extra_manifest_application_arguments = ./android/extra_manifest_application_arguments.xml

# (list) Android additionnal libraries to copy into libs/armeabi
#android.add_libs_armeabi = libs/android/*.so
#android.add_libs_armeabi_v7a = libs/android-v7/*.so
Expand All @@ -176,7 +175,7 @@ android.manifest.launch_mode = standard
#android.copy_libs = 1

# (str) The Android arch to build for, choices: armeabi-v7a, arm64-v8a, x86
android.archs = armeabi-v7a,arm64-v8a
android.archs = arm64-v8a

android.accept_sdk_license = True

Expand Down Expand Up @@ -213,6 +212,7 @@ android.accept_sdk_license = True

# (list) Permissions
[app:android.permissions]
MANAGE_EXTERNAL_STORAGE
READ_EXTERNAL_STORAGE
WRITE_EXTERNAL_STORAGE
ACCESS_LOCATION_EXTRA_COMMANDS
Expand Down Expand Up @@ -256,7 +256,7 @@ WRITE_SYNC_SETTINGS
[buildozer]

# (int) Log level (0 = error only, 1 = info, 2 = debug (with command output))
log_level = 2
log_level = 1

# (int) Display warning if buildozer is run as root (0 = False, 1 = True)
warn_on_root = 0
Expand Down
Binary file added data/msyahei.ttf
Binary file not shown.
Loading