-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from Picovoice/initial-androi
Initial Android
- Loading branch information
Showing
127 changed files
with
4,189 additions
and
440 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Android Demos | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/android-demos.yml' | ||
- 'demo/android/**' | ||
- '!demo/android/Activity/README.md' | ||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- '.github/workflows/android-demos.yml' | ||
- 'demo/android/**' | ||
- '!demo/android/Activity/README.md' | ||
|
||
jobs: | ||
build-activity-demo: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: demo/android/Activity | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Build binding | ||
run: ./gradlew assembleRelease | ||
working-directory: binding/android/PicoLLM | ||
|
||
- name: Build | ||
run: ./gradlew assembleDebug |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Android Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '.github/workflows/android-tests.yml' | ||
- 'binding/android/PicoLLM/**' | ||
- '!binding/android/PicoLLM/README.md' | ||
- 'binding/android/PicoLLMTestApp/**' | ||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+'] | ||
paths: | ||
- '.github/workflows/android-tests.yml' | ||
- 'binding/android/PicoLLM/**' | ||
- '!binding/android/PicoLLM/README.md' | ||
- 'binding/android/PicoLLMTestApp/**' | ||
|
||
defaults: | ||
run: | ||
working-directory: binding/android/PicoLLMTestApp | ||
|
||
jobs: | ||
build: | ||
name: Run Android Tests | ||
runs-on: pv-android | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Build binding | ||
run: ./gradlew assembleRelease | ||
working-directory: binding/android/PicoLLM | ||
|
||
- name: Download resource files | ||
run: curl http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.bin/latest/phi2-290.bin -o phi2-290.bin | ||
|
||
- name: Copy resource files | ||
run: ~/Android/Sdk/platform-tools/adb push --sync phi2-290.bin /sdcard/Android/data/ai.picovoice.picollm.testapp/files/external/test_resources/phi2-290.bin | ||
|
||
- name: Inject AccessKey | ||
run: echo pvTestingAccessKey="${{secrets.PV_VALID_ACCESS_KEY}}" >> local.properties | ||
|
||
- name: Inject Android keystore variables | ||
run: echo pvTestingModelName="phi2-290.bin" >> local.properties | ||
|
||
- name: Build androidTest | ||
run: ./gradlew assembleDebugAndroidTest | ||
|
||
- name: Run tests | ||
run: ./gradlew connectedAndroidTest --info |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Java CodeStyle | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**/*.java' | ||
pull_request: | ||
branches: [ main, 'v[0-9]+.[0-9]+' ] | ||
paths: | ||
- '**/*.java' | ||
|
||
jobs: | ||
check-java-codestyle: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
|
||
- name: Check Java CodeStyle | ||
run: java -Dconfig_loc=resources/.lint/java/ -jar resources/.lint/java/checkstyle-10.5.0-all.jar -c resources/.lint/java/checkstyle.xml binding/android/ demo/android/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/ | ||
.DS_Store | ||
/build | ||
/captures | ||
test_resources | ||
.settings | ||
.classpath | ||
.project | ||
publish-mavencentral.gradle |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
ext { | ||
defaultTargetSdkVersion = 31 | ||
} | ||
|
||
buildscript { | ||
repositories { | ||
maven { url "https://plugins.gradle.org/m2/" } | ||
google() | ||
mavenCentral() | ||
} | ||
dependencies { | ||
classpath "com.android.tools.build:gradle:4.2.2" | ||
} | ||
} | ||
|
||
allprojects { | ||
repositories { | ||
google() | ||
mavenCentral() | ||
} | ||
} | ||
|
||
tasks.register('clean', Delete) { | ||
delete rootProject.buildDir | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Project-wide Gradle settings. | ||
# IDE (e.g. Android Studio) users: | ||
# Gradle settings configured through the IDE *will override* | ||
# any settings specified in this file. | ||
# For more details on how to configure your build environment visit | ||
# http://www.gradle.org/docs/current/userguide/build_environment.html | ||
# Specifies the JVM arguments used for the daemon process. | ||
# The setting is particularly useful for tweaking memory settings. | ||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 | ||
# When configured, Gradle will run in incubating parallel mode. | ||
# This option should only be used with decoupled projects. More details, visit | ||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects | ||
# org.gradle.parallel=true | ||
# AndroidX package structure to make it clearer which packages are bundled with the | ||
# Android operating system, and which are packaged with your app"s APK | ||
# https://developer.android.com/topic/libraries/support-library/androidx-rn | ||
android.useAndroidX=true |
Binary file not shown.
5 changes: 5 additions & 0 deletions
5
binding/android/PicoLLM/gradle/wrapper/gradle-wrapper.properties
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
distributionBase=GRADLE_USER_HOME | ||
distributionPath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
Oops, something went wrong.