mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-14 20:48:00 +00:00
### Description 1. Enable VCPKG flag in Windows CPU CI build pipelines. 2. Increased the min supported cmake version from 3.26 to 3.28. Because of it, drop the support for the old way of finding python by "find_package(PythonLibs)". Therefore, in build.py we no longer set "PYTHON_EXECUTABLE" cmake var when doing cmake configure. 3. Added "xnnpack-ep" as a feature for ORT's vcpkg config. 4. Added asset cache support for ORT's vcpkg build 5. Added VCPKG triplet files for Android build. 6. Set VCPKG triplet to "universal2-osx" if CMAKE_OSX_ARCHITECTURES was found in cmake extra defines. 7. Removed a small piece of code in build.py, which was for support CUDA version < 11.8. 8. Fixed an issue that CMAKE_OSX_ARCHITECTURES sometimes got specified twice when build.py invoked cmake. 9. Added more model tests to Android build. After this change, we will test all ONNX versions instead of just the latest one. 10. Fixed issues that are related to build.py's "--build_nuget" parameter. Also, enable the flag in most Windows CPU CI build jobs. 11. Removed a restriction in build.py that disallowed cross-compiling Windows ARM64 nuget package on Windows x86. ### Motivation and Context Adopt vcpkg.
162 lines
4.1 KiB
YAML
162 lines
4.1 KiB
YAML
name: Mac_CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- rel-*
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- rel-*
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
python_version: 3.11
|
|
|
|
jobs:
|
|
ARM64-Xcode16:
|
|
runs-on: macos-15
|
|
|
|
env:
|
|
xcode_version: 16
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
|
|
- name: Verify ARM64 machine
|
|
shell: python
|
|
run: |
|
|
import platform
|
|
assert platform.machine() == "arm64", "This job expects to be run on an ARM64 machine."
|
|
|
|
- name: Use Xcode ${{ env.xcode_version }}
|
|
shell: bash
|
|
run: |
|
|
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
|
|
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build and test
|
|
shell: bash
|
|
run: |
|
|
python ./tools/ci_build/build.py \
|
|
--build_dir ./build \
|
|
--update \
|
|
--build --parallel \
|
|
--test \
|
|
--build_shared_lib \
|
|
--build_objc \
|
|
--use_coreml \
|
|
--use_xnnpack \
|
|
--use_binskim_compliant_compile_flags
|
|
|
|
ARM64-Xcode16-targeting-iphonesimulator:
|
|
runs-on: macos-15
|
|
|
|
env:
|
|
xcode_version: 16
|
|
|
|
strategy:
|
|
matrix:
|
|
target_arch: [x86_64, arm64]
|
|
|
|
timeout-minutes: 60
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
|
|
- name: Verify ARM64 machine
|
|
shell: python
|
|
run: |
|
|
import platform
|
|
assert platform.machine() == "arm64", "This job expects to be run on an ARM64 machine."
|
|
|
|
- name: Use Xcode ${{ env.xcode_version }}
|
|
shell: bash
|
|
run: |
|
|
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
|
|
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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 }}
|
|
|
|
Objective-C-StaticAnalysis:
|
|
runs-on: macos-14
|
|
|
|
env:
|
|
xcode_version: 15.2
|
|
|
|
timeout-minutes: 30
|
|
|
|
steps:
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.python_version }}
|
|
|
|
- name: Use Xcode ${{ env.xcode_version }}
|
|
shell: bash
|
|
run: |
|
|
XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
|
|
sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- 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
|