Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 14 additions & 0 deletions .cspell-wordlist.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,17 @@ softmax
logit
logits
probs
unet
Unet
VPRED
timesteps
Timesteps
denoises
denoise
denoising
threadpool
chrono
setpriority
errno
ifdef
elif
64 changes: 52 additions & 12 deletions .github/workflows/build-android-llm-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ on:
pull_request:
paths:
- .github/workflows/build-android-llm-example.yml
- android/**
- third-party/android/**
- apps/llm/package.json
- apps/llm/android/**
- apps/llm/**
- packages/react-native-executorch/**
push:
branches:
- main
paths:
- .github/workflows/build-android-llm-example.yml
- android/**
- third-party/android/**
- apps/llm/package.json
- apps/llm/android/**
- apps/llm/**
- packages/react-native-executorch/**
workflow_dispatch:
jobs:
build:
Expand All @@ -29,14 +25,58 @@ jobs:
steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
- name: Setup Java 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Install node dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
cache: 'gradle'
- name: Install root dependencies
run: yarn install --immutable
- name: Install Expo CLI
run: |
npm install -g @expo/cli
echo "$(npm prefix -g)/bin" >> $GITHUB_PATH
- name: Cache Expo prebuild
uses: actions/cache@v4
with:
path: ${{ env.WORKING_DIRECTORY }}/android
key: ${{ runner.os }}-expo-android-${{ hashFiles('${{ env.WORKING_DIRECTORY }}/app.json', '${{ env.WORKING_DIRECTORY }}/package.json') }}
restore-keys: |
${{ runner.os }}-expo-android-
- name: Generate native Android project
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
if [ ! -d "android" ]; then
npx expo prebuild --platform android --no-install
else
echo "Android project exists, skipping prebuild"
fi
- name: Cache Gradle
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
${{ env.WORKING_DIRECTORY }}/android/.gradle
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build app
working-directory: ${{ env.WORKING_DIRECTORY }}/android
run: ./gradlew assembleDebug --build-cache -PreactNativeArchitectures=arm64-v8a
run: |
./gradlew assembleDebug \
--build-cache \
--parallel \
--daemon \
--configure-on-demand \
-PreactNativeArchitectures=arm64-v8a \
-Dorg.gradle.jvmargs="-Xmx4g -XX:+HeapDumpOnOutOfMemoryError" \
-Dorg.gradle.workers.max=4
61 changes: 52 additions & 9 deletions .github/workflows/build-ios-llm-example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
paths:
- '.github/workflows/build-ios-llm-example.yml'
- '*.podspec'
- 'apps/llm/ios/**'
- 'apps/llm/package.json'
- 'apps/llm/**'
- 'packages/react-native-executorch/**'
pull_request:
paths:
- '.github/workflows/build-ios-llm-example.yml'
- '*.podspec'
- 'apps/llm/ios/**'
- 'apps/llm/package.json'
- 'apps/llm/**'
- 'packages/react-native-executorch/**'
workflow_dispatch:
jobs:
build:
Expand All @@ -28,12 +28,52 @@ jobs:
xcode-version: latest-stable
- name: Check out Git repository
uses: actions/checkout@v4
- name: Install node dependencies
with:
submodules: recursive
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'
- name: Install root dependencies
run: yarn install --immutable
- name: Install Expo CLI
run: |
npm install -g @expo/cli
echo "$(npm prefix -g)/bin" >> $GITHUB_PATH
- name: Cache Expo prebuild
uses: actions/cache@v4
with:
path: apps/llm/ios
key: ${{ runner.os }}-expo-ios-${{ hashFiles('apps/llm/app.json', 'apps/llm/package.json') }}
restore-keys: |
${{ runner.os }}-expo-ios-
- name: Generate native iOS project
working-directory: apps/llm
run: yarn
- name: Install pods
run: |
if [ ! -d "ios" ]; then
npx expo prebuild --platform ios --no-install
else
echo "iOS project exists, skipping prebuild"
fi
- name: Cache CocoaPods
uses: actions/cache@v4
with:
path: |
apps/llm/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('apps/llm/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install CocoaPods dependencies
working-directory: apps/llm/ios
run: pod install
run: |
if [ ! -d "Pods" ]; then
pod install
else
echo "Pods directory exists, skipping install"
fi
- name: Build app
working-directory: apps/llm/ios
run: |
Expand All @@ -44,4 +84,7 @@ jobs:
-configuration Debug \
-destination 'platform=iOS Simulator,name=iPhone 16 Pro' \
build \
CODE_SIGNING_ALLOWED=NO | xcbeautify
CODE_SIGNING_ALLOWED=NO \
-jobs $(sysctl -n hw.ncpu) \
COMPILER_INDEX_STORE_ENABLE=NO \
ONLY_ACTIVE_ARCH=YES | xcbeautify
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ lib/
# React Native Codegen
ios/generated
android/generated
apps/*/ios/
apps/*/android/

# custom
*.tgz
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "executorch"]
path = third-party/executorch
url = https://github.com/software-mansion-labs/executorch
[submodule "tokenizers-cpp"]
path = third-party/tokenizers-cpp
url = https://github.com/software-mansion-labs/tokenizers-cpp
16 changes: 0 additions & 16 deletions apps/computer-vision/android/.gitignore

This file was deleted.

Loading
Loading