forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'paco/ci_build_67bc9438d' into paco/support_hanwang
- Loading branch information
Showing
1,609 changed files
with
88,120 additions
and
48,389 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
version: 2.1 | ||
parameters: | ||
xcode-version: | ||
type: string | ||
default: "15.4.0" | ||
macos-resource-class: | ||
type: string | ||
default: macos.m1.medium.gen1 | ||
|
||
# Jobs ------------------------------------------------------------------------- | ||
jobs: | ||
build-and-test-xcframework: | ||
macos: | ||
xcode: << pipeline.parameters.xcode-version >> | ||
resource_class: << pipeline.parameters.macos-resource-class >> | ||
|
||
shell: /bin/bash --login -o pipefail | ||
|
||
steps: | ||
- run: | ||
name: check Xcode version and Python 3 | ||
command: | | ||
/usr/bin/xcodebuild -version | ||
python3 --version | ||
python --version | ||
which python3 | ||
echo $CIRCLE_WORKING_DIRECTORY | ||
- checkout | ||
- run: | ||
name: create directory to store the library | ||
command: | | ||
mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320 | ||
- run: | ||
name: install tools for build | ||
command: | | ||
brew install cmake | ||
pip install -r ${CIRCLE_WORKING_DIRECTORY}/requirements-dev.txt | ||
- run: | ||
name: build with build_apple_framework.py | ||
command: | | ||
export PYTHONPATH=${CIRCLE_WORKING_DIRECTORY}/tools/python:$PYTHONPATH | ||
python3 ${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \ | ||
--include_ops_by_config=${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \ | ||
${CIRCLE_WORKING_DIRECTORY}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json | ||
- run: | ||
name: archive the build results | ||
command: | | ||
tar -cvf /Users/distiller/project/onnxruntime_xcf.tar $HOME/onnxlibrary/macabi_release_v20230327_2320/framework_out | ||
- store_artifacts: | ||
path: /Users/distiller/project/onnxruntime_xcf.tar | ||
destination: onnxruntime_xcf.tar | ||
workflows: | ||
version: 2 | ||
build-and-test-xcframework: | ||
jobs: | ||
- build-and-test-xcframework |
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 was deleted.
Oops, something went wrong.
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,108 @@ | ||
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 | ||
xcode_version: 15.2 | ||
|
||
jobs: | ||
ARM64: | ||
runs-on: macos-14 | ||
|
||
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 | ||
Objective-C-StaticAnalysis: | ||
runs-on: macos-14 | ||
|
||
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 |
Oops, something went wrong.