Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
fd1df32
added developer docs for iOS SDK public functions
Suryansh1191 Jul 10, 2025
8a04272
[ANDROID][SDK] Update readme (#116)
void-memories Jul 14, 2025
c0ad8c9
Created Github workflow to build and publish DeliteAI docs (#96)
ultajain Jul 14, 2025
dddb1e4
[iOS][SDK] updated DEVELOPMENT.md (#117)
Suryansh1191 Jul 14, 2025
00b50c2
[iOS][SDK] updated DEVELOPMENT.md for iOS (#121)
Suryansh1191 Jul 14, 2025
e3a4398
[ANDROID][SDK] Make local.properties optional (#120)
void-memories Jul 14, 2025
839e429
Updated LLM DelitePy docs (#123)
nrjpoddar Jul 15, 2025
44080c9
[ANDROID][SDK] Fix asset copy logic + Add android tests + Code cleanu…
void-memories Jul 15, 2025
8361177
[ANDROID][SDK] Fix Integration Tests (#122)
void-memories Jul 16, 2025
b1b0870
[ANDROID][SDK](NO CODE CHANGES) Format kotlin (#125)
void-memories Jul 17, 2025
7dc2efa
Added a hyperlink for ONNX (#141)
acinaction Jul 18, 2025
c6af2ea
Add step to clean build directory before running tests (#140)
sandeep14k Jul 18, 2025
68269b4
changed file build/nimbleclient to build/nimble_client/nimble_client …
ashishkj23 Jul 18, 2025
857a6c5
Fixed coming soon (#148)
gemhunter2709 Jul 18, 2025
9f58dfc
added command to set GIT_ROOT (#144)
divyaman-pal Jul 18, 2025
91d81b1
The hyperlink for onnx in docs/deliteai.dev/index.md has been ADDED (…
TaladaJaswanth Jul 18, 2025
21177e3
Added hyperlink to ExecuTorch (#152)
Tavishi-Maini Jul 18, 2025
00a9ae0
Updated anchor link for prerequisites (#151)
Kaustubh3008 Jul 18, 2025
f9f7660
Removed TBD (#153)
gemhunter2709 Jul 18, 2025
b210799
[ANDROID] Update workflow trigger for android instrumentation tests (…
ultajain Jul 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/android-code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ name: nimblenet_ktx code coverage
on:
pull_request_review:
types: [submitted]
push:
branches:
- main

jobs:
build-and-test:
if: ${{ github.event.review.state == 'approved' }}
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') }}
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -32,4 +35,4 @@ jobs:
name: coverage-reports
path: |
sdks/android/nimblenet_ktx/build/reports/jacoco/externalDebug/html
sdks/android/nimblenet_ktx/build/reports/jacoco/externalDebug/jacoco.xml
sdks/android/nimblenet_ktx/build/reports/jacoco/externalDebug/jacoco.xml
50 changes: 37 additions & 13 deletions .github/workflows/android-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,30 @@
name: Run Android Instrumentation Tests on Linux

on:
pull_request_review:
types: [submitted]
pull_request_target:
types: [labeled, synchronize]

jobs:
test:
if: github.event.review.state == 'approved'
if: contains(github.event.pull_request.labels.*.name, 'ready-for-test')
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
strategy:
matrix:
api-level: [31]

steps:
- name: checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Setup docker and start mock server
run: |
sudo apt install -y docker-ce docker-ce-cli
python3 coreruntime/tests/utils/download_from_s3.py --default_bucket deliteai --prefix build-dependencies/llama-3.2-1B/onnx --output mockserver/mockserver_assets/llama-3 --archive_output True
cd mockserver
docker compose up --build -d

Expand Down Expand Up @@ -55,6 +61,20 @@ jobs:
cores: 4
script: echo "Generated AVD snapshot for caching."

- name: Download external dependencies
run: ./setup.sh --sdk android

- name: Configure Android test secrets
env:
ANDROID_TEST_CLIENT_ID: ${{ secrets.ANDROID_TEST_CLIENT_ID }}
ANDROID_TEST_CLIENT_SECRET: ${{ secrets.ANDROID_TEST_CLIENT_SECRET }}
ANDROID_TEST_HOST: ${{ secrets.ANDROID_TEST_HOST }}
run: |
echo '#nimbleNetConfig:androidTest' > sdks/android/local.properties
echo "ANDROID_TEST_CLIENT_ID=$ANDROID_TEST_CLIENT_ID" >> sdks/android/local.properties
echo "ANDROID_TEST_CLIENT_SECRET=$ANDROID_TEST_CLIENT_SECRET" >> sdks/android/local.properties
echo "ANDROID_TEST_HOST=$ANDROID_TEST_HOST" >> sdks/android/local.properties

- name: Run tests
timeout-minutes: 60
uses: reactivecircus/android-emulator-runner@v2
Expand All @@ -68,19 +88,23 @@ jobs:
disable-animations: true
cores: 4
script: |
# Fail fast on any command error and ensure cleanup of crashpad_handler.
set -e
trap "killall -INT crashpad_handler || true" EXIT

./gradlew clean assembleExternalDebug
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldWorkInIdealNetworkConditions && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldWorkAfterInitialServerFailure && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldNeverWorkAfterThreeServerFailure && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#onServerFailuresAssetDownloadShouldExactlyTryThreeTimes && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#onSuccessCodeSDKShouldNotMakeExtraNetworkCalls && killall -INT crashpad_handler || true
./gradlew :nimblenet_ktx:connectedExternalDebugAndroidTest && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.proto.ProtoTest && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.proto.ProtoAddEventTest && killall -INT crashpad_handler || true
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldWorkInIdealNetworkConditions
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldWorkAfterInitialServerFailure
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#assetDownloadShouldNeverWorkAfterThreeServerFailure
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#onServerFailuresAssetDownloadShouldExactlyTryThreeTimes
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.e2e.E2ENetworkingAndroidTest#onSuccessCodeSDKShouldNotMakeExtraNetworkCalls
./gradlew :nimblenet_ktx:connectedExternalDebugAndroidTest
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.proto.ProtoTest
./gradlew :app:connectedExternalDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=dev.deliteai.android.sampleapp.proto.ProtoAddEventTest

- name: Upload Test Reports (Failure Only)
if: failure()
uses: actions/upload-artifact@v4
with:
name: android-test-report
path: "**/build/reports/androidTests/connected/**"
path: "**/build/reports/androidTests/connected/**"
14 changes: 6 additions & 8 deletions .github/workflows/android-lint.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Kotlin Lint Test

on:
pull_request_review:
types: [submitted]
push:
paths:
- '**/*.kt'
- '**/*.kts'
pull_request:
paths:
- '**/*.kt'
- '**/*.kts'
branches:
- main

jobs:
ktlint-lint:
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') }}
name: Run ktlintCheck
runs-on: ubuntu-latest

Expand All @@ -27,4 +25,4 @@ jobs:
cache: gradle

- name: Run ktlint (lint test)
run: cd sdks/android && ./gradlew ktfmtCheck --quiet
run: cd sdks/android && ./gradlew ktfmtCheck --quiet
7 changes: 5 additions & 2 deletions .github/workflows/android-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ name: Run Android Unit Tests
on:
pull_request_review:
types: [submitted]
push:
branches:
- main

jobs:
unit_test:
if: github.event.review.state == 'approved'
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request_review' && github.event.review.state == 'approved') }}
runs-on: ubuntu-latest

steps:
Expand All @@ -31,4 +34,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: unit-test-report
path: sdks/android/nimblenet_ktx/build/reports/tests/testExternalDebugUnitTest/
path: sdks/android/nimblenet_ktx/build/reports/tests/testExternalDebugUnitTest/
76 changes: 76 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build and Publish Docs

on:
workflow_dispatch:

env:
S3_BUCKET: deliteai.dev
CLOUDFRONT_DIST_ID: EMNMVB8Y3G0BE

jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
ANDROID_SDK_ROOT: /usr/local/lib/android/sdk

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Set up AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
aws-region: ap-south-1

- name: Generate dummy local.properties
working-directory: sdks/android
run: |
cat <<EOF > local.properties
sdk.dir=/usr/local/lib/android/sdk
storeFile=/path/to/keystore.jks
storePassword=your_store_password
keyPassword=your_key_password
keyAlias=your_key_alias
ANDROID_DEV_AWS_ACCESS_KEY_ID=your_aws_key
ANDROID_DEV_AWS_SECRET_ACCESS_KEY=your_aws_secret
ANDROID_DEV_AWS_S3_URL=your_s3_url
OSS_USER=your_maven_user
OSS_PASSWORD=your_maven_password
ANDROID_TEST_CLIENT_ID=test_client_id
ANDROID_TEST_CLIENT_SECRET=test_client_secret
ANDROID_TEST_HOST=https://test-api-endpoint.com
REMOTE_LOGGER_KEY=your_logger_key
REMOTE_LOGGER_URL=https://your-logging-endpoint.com
EOF

- name: Generate Dokka docs
working-directory: sdks/android
run: ./gradlew dokkaGfm

- name: Build site
working-directory: docs
run: |
pip install -r requirements.txt
./scripts/run build_website

- name: Sync to S3
run: |
aws s3 sync ./docs/build/deliteai.dev/html s3://$S3_BUCKET --delete

- name: Invalidate CloudFront Cache
run: |
aws cloudfront create-invalidation \
--distribution-id "$CLOUDFRONT_DIST_ID" \
--paths "/*"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ on mobile devices.

### Extensibility
- Easy integration of custom Python operators
- Flexible runtime support (ONNX or ExecuTorch)
- Flexible runtime support ([ONNX](https://onnx.ai/) or [ExecuTorch](https://docs.pytorch.org/executorch-overview))

## Getting Started
To get started you can:
Expand Down
5 changes: 4 additions & 1 deletion coreruntime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ pip3 install -r requirements.txt
### Build Coreruntime
Navigate to `$GIT_ROOT/coreruntime` and run:
```sh
export GIT_ROOT=$(git rev-parse --show-toplevel)
python3 build.py
```
This will compile an executable `build/nimbleclient` from `main.cpp`.
This will compile an executable `build/nimble_client/nimble_client` from `main.cpp`.

### Build python SDK
Pre-requisite:
Expand All @@ -45,6 +46,7 @@ Pre-requisite: Setup mockserver by following the steps at [MockServerDocs](../mo
### Run Coreruntime tests
```sh
cd $GIT_ROOT/coreruntime
rm -rf build
python3 build.py --testing
cd build
./nimbletest
Expand All @@ -63,6 +65,7 @@ Pre-requisite: For linux since we are using Clang for compilation, appropriate g
### Run for nimbletest:
```sh
cd $GIT_ROOT/coreruntime
rm -rf build
python3 build.py --testing --coverage
cd build
./nimbletest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,4 +260,3 @@ def clear_context(self) -> None:
"""
pass

__all__ = ["LLM"]
6 changes: 3 additions & 3 deletions docs/deliteai.dev/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ across multiple platforms and devices.
### Extensibility

- Easy integration of custom Python operators
- Flexible runtime support (ONNX or ExecuTorch)
- Flexible runtime support ([ONNX](https://onnx.ai/) or ExecuTorch)

## Getting Started

Expand All @@ -43,7 +43,7 @@ Visit the [assistant](https://github.com/NimbleEdge/assistant) repo to see it al

## Documentation

[Coming Soon]
Explore our documentation at [deliteai.dev](https://deliteai.dev)

## Community engagement

Expand Down Expand Up @@ -88,7 +88,7 @@ DL_SDKS_DIR/android/README.md

coreruntime <https://github.com/NimbleEdge/deliteAI/blob/main/coreruntime/README.md>
iOS <DL_SDKS_DIR/ios/docs/DEVELOPMENT.md>
Android (TBD) <DL_SDKS_DIR/android/README.md>
Android <DL_SDKS_DIR/android/README.md>
```

```{toctree}
Expand Down
9 changes: 8 additions & 1 deletion sdks/android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ keyPassword=your_key_password
keyAlias=your_key_alias
```

#### 6. External Dependencies

Run the following command to download all the required dependencies:

```bash
cd $(git rev-parse --show-toplevel) && ./setup.sh --sdk android
```
## Quick Start

Follow these steps to get the sample application running in minutes.
Expand Down Expand Up @@ -389,7 +396,7 @@ Run instrumented tests on a connected device or emulator:

**Prerequisites for Android Tests:**
- Connected Android device or running emulator
- Device meets the minimum requirements listed in [Prerequisites](#-prerequisites)
- Device meets the minimum requirements listed in [Prerequisites](#prerequisites)
- Proper configuration in `local.properties`

## API Reference
Expand Down
1 change: 0 additions & 1 deletion sdks/android/app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/build
/edge
/release_key.jks
/src/androidTest/java/generated
31 changes: 16 additions & 15 deletions sdks/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ plugins {
id "org.jetbrains.kotlin.plugin.compose"
}

def executedTask = gradle.startParameter.taskNames.toString()
def localProps = new Properties()
localProps.load(new FileInputStream(rootProject.file("local.properties")))

Properties localProperties = new Properties()
def propertiesFile = project.rootProject.file('local.properties')
if (propertiesFile.exists()) {
Expand All @@ -22,12 +18,15 @@ if (propertiesFile.exists()) {

android {
signingConfigs {
externalRelease {
storeFile file(localProperties.getProperty('storeFile'))
storePassword localProperties.getProperty('storePassword')
keyPassword localProperties.getProperty('keyPassword')
keyAlias localProperties.getProperty('keyAlias')
}

// Uncomment for sample app release build:
//
// externalRelease {
// storeFile file(localProperties.getProperty('storeFile'))
// storePassword localProperties.getProperty('storePassword')
// keyPassword localProperties.getProperty('keyPassword')
// keyAlias localProperties.getProperty('keyAlias')
// }
}

namespace 'dev.deliteai.android.sampleapp'
Expand All @@ -41,19 +40,21 @@ android {
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
signingConfig signingConfigs.externalRelease

vectorDrawables {
useSupportLibrary true
}

buildConfigField "String", "APP_CLIENT_ID", "\"${localProps['APP_CLIENT_ID']}\""
buildConfigField "String", "APP_CLIENT_SECRET", "\"${localProps['APP_CLIENT_SECRET']}\""
buildConfigField "String", "APP_HOST", "\"${localProps['APP_HOST']}\""
buildConfigField "String", "APP_CLIENT_ID", "\"${localProperties['APP_CLIENT_ID']}\""
buildConfigField "String", "APP_CLIENT_SECRET", "\"${localProperties['APP_CLIENT_SECRET']}\""
buildConfigField "String", "APP_HOST", "\"${localProperties['APP_HOST']}\""
}

buildTypes {
release {
signingConfig signingConfigs.externalRelease
// Uncomment for sample app release build:
// signingConfig signingConfigs.externalRelease

minifyEnabled true
shrinkResources true
debuggable false
Expand Down
Loading