This repository has been archived by the owner on Nov 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
62 lines (50 loc) · 1.98 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
arch: [arm, arm64, x86, x86_64]
runs-on: ubuntu-18.04
env:
CMAKE_VERSION: 3.18.4
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get install -y build-essential gcc-multilib python unzip pkg-config p7zip-full
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 "::set-output name=apk_file::$(ls omw-debug-*.apk | sed 's/\(.*\)\..*/\1/')"
echo "::set-output name=symbols_file::$(ls symbols-*.7z | sed 's/\(.*\)\..*/\1/')"
- name: Upload the APK
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getfilename.outputs.apk_file }}
path: ${{ steps.getfilename.outputs.apk_file }}.apk
- name: Upload debug symbols
uses: actions/upload-artifact@v1
with:
name: ${{ steps.getfilename.outputs.symbols_file }}
path: ${{ steps.getfilename.outputs.symbols_file }}.7z