forked from microsoft/cpp_client_telemetry
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (61 loc) · 1.91 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
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@v2
with:
submodules: 'true'
continue-on-error: true
- name: Chocolatey
run: |
$Env:ANDROID_SDK_ROOT = "C:\Android\android-sdk"
gci env:* | sort-object name
choco install --no-progress -y android-sdk
choco install --no-progress -y ninja
new-item "C:\Users\runneradmin\.android\repositories.cfg" -ItemType "file"
echo yes | C:\Android\android-sdk\tools\bin\sdkmanager.bat "ndk-bundle" "cmake;3.10.2.4988404" "ndk;21.1.6352462" --sdk_root=$Env:ANDROID_SDK_ROOT
gci -r -i "CMake*" C:\Android
echo $Env:PATH
- name: Gradle Build
run: |
$Env:PATH = "C:\Android\android-sdk\cmake\3.10.2.4988404\bin;" + $Env:PATH
cd "$Env:GITHUB_WORKSPACE\lib\android_build"
.\gradlew.bat assemble
env:
ANDROID_SDK_ROOT: "C:\\Android\\android-sdk"
ANDROID_HOME: "C:\\Android\\android-sdk"
ANDROID_NDK: "C:\\Android\\android-ndk-r20"
ANDROID_NDK_HOME: "C:\\Android\\android-ndk-r20"
- name: Java Unit test
run: |
cd "$Env:GITHUB_WORKSPACE\lib\android_build"
.\gradlew.bat maesdk:test
env:
ANDROID_SDK_ROOT: "C:\\Android\\android-sdk"
ANDROID_HOME: "C:\\Android\\android-sdk"
ANDROID_NDK: "C:\\Android\\android-ndk-r20"
ANDROID_NDK_HOME: "C:\\Android\\android-ndk-r20"
- name: Upload Reports
if: failure()
uses: actions/upload-artifact@v1
with:
name: reports
path: lib\android_build\maesdk\build\reports