Update README.md #1
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: 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 --arch ${{ matrix.arch }} | |
- name: Build the APK | |
run: | | |
ARCH=${{ matrix.arch }} source buildscripts/include/version.sh | |
sed -i "s/abiFilters.*/abiFilters '$ABI'/" app/build.gradle | |
export ANDROID_NDK_HOME=$(pwd)/buildscripts/toolchain/ndk/ | |
./gradlew assembleNightlyDebug | |
- name: Compress symbols | |
run: | | |
cd buildscripts | |
./package-symbols.sh | |
mv symbols.7z ../symbols-$(git rev-parse --short "$GITHUB_SHA")-${{ matrix.arch }}.7z | |
- 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 | |
echo "symbols_file=$(ls symbols-*.7z | sed 's/\(.*\)\..*/\1/')" >> $GITHUB_ENV | |
- name: Upload the APK | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.apk_file }} | |
path: ${{ env.apk_file }}.apk | |
- name: Upload debug symbols | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.symbols_file }} | |
path: ${{ env.symbols_file }}.7z |