-
Notifications
You must be signed in to change notification settings - Fork 49
79 lines (76 loc) · 2.22 KB
/
build-android.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Build for Android
on:
push:
branches:
- master
- main
- dev
- dev/*
- release/*
- buildme/*
- maharrim/*
pull_request:
branches:
- master
- main
- dev
jobs:
build:
runs-on: windows-latest
name: Build for Android
steps:
- name: Checkout
uses: actions/checkout@v3
with:
depth: 1
submodules: 'false'
- name: Update submodules
run: |
git submodule sync
git config --global submodule.lib/modules.update none
git -c protocol.version=2 submodule update --init --force --depth=1
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Remove default github maven configuration
# Workaround for: 'Unable to decrypt local Maven settings credentials'
run: rm $Env:USERPROFILE\.m2\settings.xml
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install NDK
run: |
java -version
gci env:* | sort-object name
new-item "C:\Users\runneradmin\.android\repositories.cfg" -ItemType "file"
echo yes | .\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.4.7075529" --sdk_root=$Env:ANDROID_SDK_ROOT
working-directory: ${{ env.ANDROID_SDK_ROOT }}\cmdline-tools\7.0\bin
- name: Chocolatey
run: |
choco install --no-progress -y ninja
- name: List CMake
run: |
pwd
echo "=================="
gci -r -i "CMake*" -Name
echo "=================="
gci -r -i "gtest-all*" -Name
echo "=================="
gci third_party/ -Name
echo "=================="
gci third_party/googletest -Name
- name: Gradle Build
run: |
.\gradlew.bat maesdk:assemble app:assemble
working-directory: lib\android_build
- name: Java Unit test
run: |
.\gradlew.bat maesdk:test
working-directory: lib\android_build
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: reports
path: lib\android_build\maesdk\build\reports