Skip to content

chore: Update Android build workflow to upgrade pip and install depen… #13

chore: Update Android build workflow to upgrade pip and install depen…

chore: Update Android build workflow to upgrade pip and install depen… #13

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Used to cache dependencies with a timeout
- name: Get Date
id: get-date
run: |
echo "date=$(date -u +'%Y%m%d')" >> $GITHUB_ENV
shell: bash
- name: Cache Buildozer global directory
uses: actions/cache@v4
with:
path: .buildozer_global
key: buildozer-global-${{ hashFiles('buildozer.spec') }}
- uses: actions/cache@v4
with:
path: .buildozer
key: ${{ runner.os }}-${{ steps.get-date.outputs.date }}-${{ hashFiles('buildozer.spec') }}
# Install dependencies
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y \
build-essential \
git \
libsdl2-dev \
libsdl2-image-dev \
libsdl2-mixer-dev \
libsdl2-ttf-dev \
libportmidi-dev \
libswscale-dev \
libavformat-dev \
libavcodec-dev \
libunwind-dev \
zlib1g-dev
sudo apt-get install -y \
libsqlite3-dev \
sqlite3 \
bzip2 \
libbz2-dev \
zlib1g-dev \
openssl \
libgdbm-dev \
libgdbm-compat-dev \
liblzma-dev \
libreadline-dev \
uuid-dev \
libgstreamer1.0 \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good
sudo apt-get install -y \
zip \
unzip \
autoconf \
libtool \
pkg-config \
libncurses5-dev \
libncursesw5-dev \
libtinfo5 \
cmake \
libffi-dev \
libssl-dev \
automake
- name: Setup Java 21 temurin required by Gradle
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
check-latest: true
# Set up Python
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12' #set your python version
# cache: 'pip' # caching pip dependencies
- run: |
pip install --upgrade pip
pip install python-escpos==3.1
pip install 'python-socketio[client]'
pip install python-dotenv==1.0.1
pip install platformdirs==4.2.2
pip install kivy==2.3.0
pip install cython==3.0.11
pip install buildozer==1.5.0
# Build with Buildozer
- name: Build with Buildozer
id: buildozer
run: |
yes | buildozer android debug
# Upload artifacts
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: package
path: bin/*.apk