Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial iOS #3

Merged
merged 16 commits into from
Apr 19, 2024
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ios-demos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: iOS Demos

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- 'demo/ios/**'
- '.github/workflows/ios-demos.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- 'demo/ios/**'
- '.github/workflows/ios-demos.yml'

defaults:
run:
working-directory: demo/ios/PicoLLMDemo

jobs:
build:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install Cocoapods
run: gem install cocoapods

- name: Run Cocoapods
run: pod install

- name: Build
run: xcrun xcodebuild build
-configuration Debug
-workspace PicoLLMDemo.xcworkspace
-sdk iphoneos
-scheme PicoLLMDemo
-derivedDataPath ddp
CODE_SIGNING_ALLOWED=NO
55 changes: 55 additions & 0 deletions .github/workflows/ios-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: iOS Tests

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '.github/workflows/ios-local.yml'
- 'binding/ios/PicoLLMAppTest/**'
- 'resources/.test/**'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '.github/workflows/ios-local.yml'
- 'binding/ios/PicoLLMAppTest/**'
- 'resources/.test/**'

defaults:
run:
working-directory: binding/ios/PicoLLMAppTest

jobs:
build:
name: Run iOS Tests
runs-on: pv-ios

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Run Cocoapods
run: pod install

- name: Inject AccessKey
run: sed -i '.bak' 's:{TESTING_ACCESS_KEY_HERE}:${{secrets.PV_VALID_ACCESS_KEY}}:'
PicoLLMAppTestUITests/BaseTest.swift

- name: Inject Resource URL
run: sed -i '.bak' 's?{TESTING_MODEL_URL_HERE}?http://${{secrets.PV_CICD_RES_SERVER_AUTHORITY}}/github/picollm/res/phi2-290.bin/latest/phi2-290.bin?'
PicoLLMAppTestUITests/BaseTest.swift

- name: XCode Build
run: xcrun xcodebuild build-for-testing
-configuration Debug
-workspace PicoLLMAppTest.xcworkspace
-sdk iphoneos
-scheme PicoLLMAppTest
-derivedDataPath ddp
CODE_SIGNING_ALLOWED=NO

- name: Run Tests on Simulator
run: xcrun xcodebuild test
-workspace PicoLLMAppTest.xcworkspace
-scheme PicoLLMAppTest
-destination 'platform=iOS Simulator,name=iPhone 13'
26 changes: 26 additions & 0 deletions .github/workflows/swift-codestyle.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Swift Codestyle

on:
workflow_dispatch:
push:
branches: [ main ]
paths:
- '**/*.swift'
- '.github/workflows/swift-codestyle.yml'
pull_request:
branches: [ main, 'v[0-9]+.[0-9]+' ]
paths:
- '**/*.swift'
- '.github/workflows/swift-codestyle.yml'

jobs:
check-switch-codestyle:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Check swift codestyle
uses: norio-nomura/[email protected]
with:
args: lint --config resources/.lint/swift/.swiftlint.yml --strict
19 changes: 19 additions & 0 deletions binding/ios/PicoLLM-iOS.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Pod::Spec.new do |s|
s.name = 'PicoLLM-iOS'
s.module_name = 'PicoLLM'
s.version = '1.0.0'
s.license = {:type => 'Apache 2.0'}
s.summary = 'iOS SDK for PicoLLM'
s.description =
<<-DESC
PicoLLM engine.
DESC
s.homepage = 'https://github.com/Picovoice/picollm/tree/master/binding/ios'
s.author = { 'Picovoice' => '[email protected]' }
s.source = { :git => '' }
s.ios.deployment_target = '13.0'
s.swift_version = '5.0'
s.vendored_frameworks = 'lib/ios/PvPicoLLM.xcframework'
s.source_files = '*.{swift}'
s.exclude_files = 'PicoLLMAppTest/**'
end
Loading
Loading