mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-06-16 01:33:39 +00:00
Treat Objective-C static analysis warnings as errors (#16293)
- Update Objective-C static analysis check to fail on warnings. - Address warning. - Clean up build definition.
This commit is contained in:
parent
443f553782
commit
b668a6da96
5 changed files with 14 additions and 14 deletions
|
|
@ -16,7 +16,7 @@ extern "C" {
|
|||
*
|
||||
* Available since 1.15.
|
||||
*/
|
||||
NSString* ORTVersion(void);
|
||||
NSString* _Nullable ORTVersion(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@
|
|||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
NSString* ORTVersion(void) {
|
||||
std::string result = OrtGetApiBase()->GetVersionString();
|
||||
return [NSString stringWithUTF8String:result.c_str()];
|
||||
NSString* _Nullable ORTVersion(void) {
|
||||
return [NSString stringWithUTF8String:OrtGetApiBase()->GetVersionString()];
|
||||
}
|
||||
|
||||
@implementation ORTEnv {
|
||||
|
|
|
|||
|
|
@ -542,11 +542,12 @@ def parse_arguments():
|
|||
parser.add_argument(
|
||||
"--cmake_generator",
|
||||
choices=[
|
||||
"MinGW Makefiles",
|
||||
"Ninja",
|
||||
"NMake Makefiles",
|
||||
"Unix Makefiles",
|
||||
"Visual Studio 16 2019",
|
||||
"Visual Studio 17 2022",
|
||||
"Ninja",
|
||||
"MinGW Makefiles",
|
||||
"NMake Makefiles",
|
||||
"Xcode",
|
||||
],
|
||||
default=None,
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
ninja==1.10.2
|
||||
|
|
@ -17,14 +17,10 @@ jobs:
|
|||
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" \
|
||||
--cmake_generator "Unix Makefiles" \
|
||||
--config Debug \
|
||||
--build_shared_lib --use_coreml --build_objc \
|
||||
--cmake_extra_defines CMAKE_EXPORT_COMPILE_COMMANDS=ON \
|
||||
|
|
@ -33,9 +29,14 @@ jobs:
|
|||
displayName: Generate compile_commands.json and ONNX protobuf files
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
CLANG_TIDY_CHECKS="-*,clang-analyzer-*"
|
||||
|
||||
"$(brew --prefix llvm@15)/bin/clang-tidy" \
|
||||
-p="$(Build.BinariesDirectory)/Debug" \
|
||||
--checks="-*,clang-analyzer-*" \
|
||||
--checks="${CLANG_TIDY_CHECKS}" \
|
||||
--warnings-as-errors="${CLANG_TIDY_CHECKS}" \
|
||||
--header-filter="objectivec/include|objectivec|onnxruntime/core" \
|
||||
./objectivec/*.mm \
|
||||
./onnxruntime/core/platform/apple/logging/apple_log_sink.mm \
|
||||
|
|
|
|||
Loading…
Reference in a new issue