6
6
# workflow_dispatch:
7
7
# branches: [main, develop]
8
8
9
+ env :
10
+ python_version : 3.11
9
11
10
12
jobs :
11
13
build_macabi_xcf :
12
- runs-on : macos-latest
14
+ runs-on : macos-14
15
+ env :
16
+ xcode_version : 15
13
17
steps :
14
18
- name : install Python 3.10
15
- uses : actions/setup-python@v4
19
+ uses : actions/setup-python@v5
16
20
with :
17
- python-version : ' 3.10 '
21
+ python-version : ${{ env.python_version }}
18
22
19
23
- name : check Xcode version and Python 3
20
24
run : |
@@ -23,34 +27,83 @@ jobs:
23
27
python --version
24
28
which python3
25
29
30
+ # - name: Use Xcode ${{ env.xcode_version }}
31
+ # shell: bash
32
+ # run: |
33
+ # XCODE_DEVELOPER_DIR="/Applications/Xcode_${{ env.xcode_version }}.app/Contents/Developer"
34
+ # sudo xcode-select --switch "${XCODE_DEVELOPER_DIR}"
35
+
26
36
- name : checkout repository
27
- uses : actions/checkout@v3
28
-
29
- - name : install protoc
30
- run : |
31
- mkdir -p $HOME/Downloads
32
- cd $HOME/Downloads
33
- curl -LJO https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip
34
- unzip protoc-21.12-osx-universal_binary.zip -d protoc-21.12-osx-universal_binary
35
- mv protoc-21.12-osx-universal_binary/bin/protoc /usr/local/bin/protoc-3.21.12.0
36
- mv protoc-21.12-osx-universal_binary/include/* /usr/local/include/
37
-
37
+ uses : actions/checkout@v4
38
+
39
+ # - name: install protoc
40
+ # run : |
41
+ # mkdir -p $HOME/Downloads
42
+ # cd $HOME/Downloads
43
+ # curl -LJO https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip
44
+ # unzip protoc-21.12-osx-universal_binary.zip -d protoc-21.12-osx-universal_binary
45
+ # mv protoc-21.12-osx-universal_binary/bin/protoc /usr/local/bin/protoc-3.21.12.0
46
+ # mv protoc-21.12-osx-universal_binary/include/* /usr/local/include/
47
+
38
48
- name : create directory to store the library
39
49
run : mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320
40
50
41
- - name : create release build
51
+ # - name: create release build
52
+ # run: |
53
+ # # Since Python 3.12, distutils is removed
54
+ # # pip3 install setuptools
55
+ # export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH
56
+ # cd ${{ github.workspace }}/tools/python
57
+ # ls ${{ github.workspace }}/tools/python
58
+ # # pip install -r ${{ github.workspace }}/requirements-dev.txt
59
+ # # pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt
60
+ # #Deal with lSystem
61
+ # export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
62
+ # export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib"
63
+ # #Build command
64
+ # python tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dir /Users/goodnotesci/onnxlibrary/ios_release_v20240405_onnx116 --include_ops_by_config tools/ci_build/github/apple/hws_mobile_package.required_operators.config tools/ci_build/github/apple/default_full_ios_framework_build_settings.json
65
+
66
+ # python ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \
67
+ # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \
68
+ # --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config
69
+
70
+ - name : create releae build
42
71
run : |
43
- # Since Python 3.12, distutils is removed
44
- # pip3 install setuptools
45
72
export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH
46
- cd ${{ github.workspace }}/tools/python
47
- ls ${{ github.workspace }}/tools/python
48
73
pip install -r ${{ github.workspace }}/requirements-dev.txt
49
- pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt
50
- #Deal with lSystem
51
- export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
52
- export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib"
53
- #Build command
54
- python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \
74
+ python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \
55
75
--include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \
56
- --path_to_protoc_exe=/usr/local/bin/protoc-3.21.12.0 ${{ github.workspace }}/tools/ci_build/github/apple/default_full_macabi_framework_build_settings.json
76
+ ${{ github.workspace }}/tools/ci_build/github/apple/default_full_ios_framework_build_settings.json
77
+
78
+ # python ./tools/ci_build/build.py \
79
+ # --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \
80
+ # --update \
81
+ # --build --parallel \
82
+ # --test \
83
+ # --build_shared_lib \
84
+ # --build_objc \
85
+ # --use_coreml \
86
+ # --use_xnnpack \
87
+ # --use_binskim_compliant_compile_flags \
88
+ # --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/default_full_macabi_framework_build_settings.json
89
+
90
+
91
+ - name : create release build 2
92
+ run : |
93
+ python ./tools/ci_build/build.py \
94
+ --build_dir $HOME/onnxlibrary/macabi_release_v20230327_2320 \
95
+ --update \
96
+ --build --parallel \
97
+ --skip_tests \
98
+ --build_apple_framework \
99
+ --use_xcode \
100
+ --use_coreml \
101
+ --use_xnnpack \
102
+ --use_binskim_compliant_compile_flags \
103
+ --ios \
104
+ --apple_deploy_target=16.0 \
105
+ --apple_sysroot=iphonesimulator \
106
+ --osx_arch=x86_64 \
107
+ --cmake_extra_defines=onnxruntime_BUILD_UNIT_TESTS=OFF \
108
+ --include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config
109
+
0 commit comments