Skip to content

Update main.yml

Update main.yml #42

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
arch: [arm64]
runs-on: ubuntu-20.04
env:
CMAKE_VERSION: 3.19.7
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential gcc-multilib python unzip pkg-config p7zip-full ccache
cd /home/runner/
wget https://github.com/Kitware/CMake/releases/download/v$CMAKE_VERSION/cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
tar xvf cmake-$CMAKE_VERSION-Linux-x86_64.tar.gz
- name: Build native libraries
run: |
export PATH=/home/runner/cmake-$CMAKE_VERSION-Linux-x86_64/bin/:$PATH
cd buildscripts
./build.sh
- name: Build the APK
run: |
sed -i "s/abiFilters.*/abiFilters '$ABI'/" app/build.gradle
export ANDROID_NDK_HOME=$(pwd)/buildscripts/android-ndk-r26b/
./gradlew assembleNightlyDebug
- name: Collect outputs
id: getfilename
run: |
mv app/build/outputs/apk/nightly/debug/omw_debug_*.apk omw-debug-$(git rev-parse --short "$GITHUB_SHA")-${{ matrix.arch }}.apk
echo "apk_file=$(ls omw-debug-*.apk | sed 's/\(.*\)\..*/\1/')" >> $GITHUB_ENV
- name: Upload the APK
uses: actions/upload-artifact@v3
with:
name: ${{ env.apk_file }}
path: ${{ env.apk_file }}.apk