mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-03 23:49:44 +00:00
### Description <!-- Describe your changes. --> Add Swift Package Manager (SPM) support for ORT based on #14621 - uses the existing objective-c bindings - some re-organization of the directory structure was required but the contents of the files are unchanged, apart from adjustments due to file movements Add tool for updating ORT native pod used in the SPM package Update CIs to use ORT native pod from build, and build/test using SPM ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> iOS developers are using SPM as much as cocoapods, so adding SPM means both are catered for.
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
jobs:
|
|
- job: ObjCStaticAnalysis
|
|
|
|
pool:
|
|
vmImage: 'macOS-12'
|
|
|
|
timeoutInMinutes: 30
|
|
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: recursive
|
|
|
|
- task: UsePythonVersion@0
|
|
inputs:
|
|
versionSpec: "3.9"
|
|
addToPath: true
|
|
architecture: "x64"
|
|
|
|
- script: |
|
|
pip install -r tools/ci_build/github/apple/objectivec/static_analysis/requirements.txt
|
|
displayName: Install tools
|
|
|
|
- script: |
|
|
python tools/ci_build/build.py \
|
|
--build_dir "$(Build.BinariesDirectory)" \
|
|
--cmake_generator "Ninja" \
|
|
--config Debug \
|
|
--build_shared_lib --use_coreml --build_objc \
|
|
--cmake_extra_defines CMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
|
--update --skip_submodule_sync \
|
|
--build --parallel --target onnx_proto
|
|
displayName: Generate compile_commands.json and ONNX protobuf files
|
|
|
|
- script: |
|
|
"$(brew --prefix llvm@15)/bin/clang-tidy" \
|
|
-p="$(Build.BinariesDirectory)/Debug" \
|
|
--checks="-*,clang-analyzer-*" \
|
|
--header-filter="objectivec/include|objectivec|onnxruntime/core" \
|
|
./objectivec/*.mm \
|
|
./onnxruntime/core/platform/apple/logging/apple_log_sink.mm \
|
|
./onnxruntime/core/providers/coreml/model/*.mm
|
|
displayName: Analyze Objective-C/C++ source code
|