-
Notifications
You must be signed in to change notification settings - Fork 144
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added iOS & Android support in NuGet package (#923)
Internal work item: https://task.ms/aii/46622 Successful run: https://aiinfra.visualstudio.com/ONNX%20Runtime/_build/results?buildId=566410&view=artifacts&pathAsName=false&type=publishedArtifacts
- Loading branch information
1 parent
b3dfed6
commit 0f59a90
Showing
18 changed files
with
215 additions
and
37 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
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
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
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
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
23 changes: 23 additions & 0 deletions
23
.pipelines/stages/jobs/steps/utils/set-cmake-build-type.yml
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,23 @@ | ||
parameters: | ||
- name: build_config | ||
type: string | ||
steps: | ||
- task: PowerShell@2 | ||
displayName: 'Set CMake Build Type' | ||
inputs: | ||
workingDirectory: $(Build.SourcesDirectory) | ||
targetType: inline | ||
script: | | ||
$chosen_build_config = "${{ parameters.build_config }}" | ||
$cmake_build_type = $chosen_build_config; | ||
if ($chosen_build_config -eq "release") { | ||
$cmake_build_type = "Release" | ||
} | ||
elseif ($chosen_build_config -eq "relwithdebinfo") { | ||
$cmake_build_type = "RelWithDebInfo" | ||
} | ||
elseif ($chosen_build_config -eq "debug") { | ||
$cmake_build_type = "Debug" | ||
} | ||
Write-Host "Current build type: $cmake_build_type" | ||
Write-Host "##vso[task.setvariable variable=cmake_build_type]$cmake_build_type" |
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
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
8 changes: 8 additions & 0 deletions
8
nuget/targets/net8.0-android/Microsoft.ML.OnnxRuntimeGenAI.targets
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,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Condition=" '$(AndroidApplication)'=='true' "> | ||
<AndroidLibrary Bind="false" Include="$(MSBuildThisFileDirectory)..\..\runtimes\android\native\*"> | ||
<Link>%(Filename)%(Extension)</Link> | ||
</AndroidLibrary> | ||
</ItemGroup> | ||
</Project> |
13 changes: 13 additions & 0 deletions
13
nuget/targets/net8.0-ios/Microsoft.ML.OnnxRuntimeGenAI.targets
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,13 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Condition="('$(OutputType)'!='Library' OR '$(IsAppExtension)'=='True')"> | ||
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\ios\native\onnxruntime-genai.xcframework"> | ||
<Kind>Static</Kind> | ||
<IsCxx>True</IsCxx> | ||
<SmartLink>True</SmartLink> | ||
<ForceLoad>True</ForceLoad> | ||
<LinkerFlags>-lc++</LinkerFlags> | ||
<WeakFrameworks>CoreML</WeakFrameworks> | ||
</NativeReference> | ||
</ItemGroup> | ||
</Project> |
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,3 @@ | ||
### Notes for maccatalyst .NET targets: | ||
|
||
We only add a blank file for the target framework folder here and thus will be including blank TFM under build/ and buildTransitive/ in the Nuget package. The reason is for Mac Catalyst platform, it directly will resolve the xcframework from the runtimes/native/ios folder based on this [RuntimeidentifierGraph](https://github.com/dotnet/sdk/blob/main/src/Layout/redist/PortableRuntimeIdentifierGraph.json#L300-L304) |
Empty file.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.