fix: build app with cargo-apk #38
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
jobs: | |
# Build job. Builds app for Android with Buildozer | |
build-android: | |
name: Build for Android | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install Android Sdk | |
run: | | |
sudo add-apt-repository ppa:openjdk-r/ppa | |
sudo apt-get update | |
sudo apt-get install openjdk-8-jdk | |
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip | |
unzip tools_r25.2.3-linux.zip -d sdk | |
cd /sdk/tools | |
./android update sdk --no-ui | |
export ANDROID_HOME=$HOME/sdk | |
export PATH=${PATH}:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools:$ANDROID_HOME/build-tools/26.0.0-preview/ | |
sudo apt-get install libc6:i386 libstdc++6:i386 | |
sudo apt-get install zlib1g:i386 | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: | | |
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 | |
cargo install cargo-apk | |
cd ${{ github.workspace }} | |
cargo apk build | |
# python -m pip install --upgrade buildozer Cython==0.29.33 virtualenv | |
# export PATH=$PATH:~/.local/bin/ | |
# export APP_ANDROID_ACCEPT_SDK_LICENSE=1 | |
# export BUILDOZER_WARN_ON_ROOT=0 | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# - name: Upgrade Cython | |
# uses: actions/setup-python@v2 | |
# with: | |
# python-version: '3.8' | |
# - name: Build with Buildozer | |
# uses: ArtemSBulgakov/buildozer-action@v1 | |
# id: buildozer | |
# with: | |
# command: buildozer android debug | |
# # workdir: <specify the directory of the app no don't mention this the app files are in root directory> | |
# buildozer_version: stable | |
# - name: Build with Buildozer | |
# run: | | |
# 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 | |
# python -m pip install --upgrade buildozer Cython==0.29.33 virtualenv | |
# pip install iop_python | |
# export PATH=$PATH:~/.local/bin/ | |
# export APP_ANDROID_ACCEPT_SDK_LICENSE=1 | |
# export BUILDOZER_WARN_ON_ROOT=0 | |
# cd ${{ github.workspace }} | |
# buildozer android debug | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: package | |
path: bin/*.apk | |
# path: ${{ steps.buildozer.outputs.filename }} |