Skip to content

Add logging macros for KleidiAI and fix todos from previous PR #17639

Add logging macros for KleidiAI and fix todos from previous PR

Add logging macros for KleidiAI and fix todos from previous PR #17639

Workflow file for this run

name: "MacOS CI Pipeline"
on:
push:
branches:
- main
- rel-*
pull_request:
branches:
- main
- rel-*
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.sha }}
cancel-in-progress: true
env:
python_version: 3.11
jobs:
cpu:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
with:
# Only build arm64 for CPU
matrix_include: >-
[
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
coreml:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
with:
use_coreml: true
matrix_include: >-
[
{"machine": "arm64", "target": "x86_64", "build_config": "Release"},
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
xnnpack:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
with:
use_xnnpack: true
# only build arm64/Debug for XNNPack
matrix_include: >-
[
{"machine": "arm64", "target": "arm64", "build_config": "Debug"}
]
webgpu:
uses: ./.github/workflows/macos-ci-build-and-test-workflow.yml
with:
use_webgpu: true
matrix_include: >-
[
{"machine": "arm64", "target": "x86_64", "build_config": "Release"},
{"machine": "arm64", "target": "arm64", "build_config": "Debug"},
{"machine": "arm64", "target": "arm64", "build_config": "Release"}
]
iphone_simulator:
runs-on: macos-15
env:
xcode_version: 16.4
simulator_runtime_version: 18.5
strategy:
matrix:
target_arch: [x86_64, arm64]
timeout-minutes: 90
steps:
- name: Checkout code
uses: actions/checkout@v5
- uses: microsoft/onnxruntime-github-actions/[email protected]
with:
vcpkg-version: '2025.06.13'
vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc
cmake-version: '3.31.8'
cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8
add-cmake-to-path: 'true'
disable-terrapin: 'true'
- name: macOS CI pipeline prepare steps
uses: ./.github/actions/macos-ci-setup
with:
platform_machine: "arm64"
python_version: ${{ env.python_version }}
xcode_version: ${{ env.xcode_version }}
use_cache: false
- name: Build for iphonesimulator ${{ matrix.target_arch }}
shell: bash
run: |
python ./tools/ci_build/build.py \
--build_dir ./build \
--update \
--build --parallel \
--test \
--build_apple_framework \
--use_xcode \
--use_coreml \
--use_xnnpack \
--use_binskim_compliant_compile_flags \
--ios \
--apple_deploy_target=15.1 \
--apple_sysroot=iphonesimulator \
--osx_arch=${{ matrix.target_arch }}
env:
ORT_GET_SIMULATOR_DEVICE_INFO_REQUESTED_RUNTIME_VERSION: ${{ env.simulator_runtime_version }}
Objective-C-StaticAnalysis:
runs-on: macos-14
env:
xcode_version: 15.2
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v5
- uses: microsoft/onnxruntime-github-actions/[email protected]
with:
vcpkg-version: '2025.06.13'
vcpkg-hash: 735923258c5187966698f98ce0f1393b8adc6f84d44fd8829dda7db52828639331764ecf41f50c8e881e497b569f463dbd02dcb027ee9d9ede0711102de256cc
cmake-version: '3.31.8'
cmake-hash: 99cc9c63ae49f21253efb5921de2ba84ce136018abf08632c92c060ba91d552e0f6acc214e9ba8123dee0cf6d1cf089ca389e321879fd9d719a60d975bcffcc8
add-cmake-to-path: 'true'
disable-terrapin: 'true'
- name: macOS CI pipeline prepare steps
uses: ./.github/actions/macos-ci-setup
with:
platform_machine: "arm64"
python_version: ${{ env.python_version }}
xcode_version: ${{ env.xcode_version }}
use_cache: false
- name: Generate compile_commands.json and ONNX protobuf files
shell: bash
run: |
python ./tools/ci_build/build.py \
--build_dir ./build \
--cmake_generator "Unix Makefiles" \
--config Debug \
--build_shared_lib \
--use_coreml \
--build_objc \
--enable_training_apis \
--cmake_extra_defines CMAKE_EXPORT_COMPILE_COMMANDS=ON \
--use_binskim_compliant_compile_flags \
--update \
--build --parallel \
--target onnx_proto
- name: Analyze Objective-C/C++ source code
shell: bash
run: |
CLANG_TIDY_CHECKS="-*,clang-analyzer-*"
"$(brew --prefix llvm@15)/bin/clang-tidy" \
-p=./build/Debug \
--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 \
./onnxruntime/core/providers/coreml/model/*.mm