forked from microsoft/onnxruntime
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (48 loc) · 2.25 KB
/
generate-xcframework-maccatalyst.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: "Build XCFramework for MacCatalyst"
on:
workflow_dispatch:
push:
#workflow_dispatch:
# branches: [main, develop]
jobs:
build_macabi_xcf:
runs-on: macos-latest
steps:
- name: install Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: check Xcode version and Python 3
run: |
/usr/bin/xcodebuild -version
python3 --version
python --version
which python3
- name: checkout repository
uses: actions/checkout@v3
- name: install protoc
run : |
mkdir -p $HOME/Downloads
cd $HOME/Downloads
curl -LJO https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip
unzip protoc-21.12-osx-universal_binary.zip -d protoc-21.12-osx-universal_binary
mv protoc-21.12-osx-universal_binary/bin/protoc /usr/local/bin/protoc-3.21.12.0
mv protoc-21.12-osx-universal_binary/include/* /usr/local/include/
- name: create directory to store the library
run: mkdir -p $HOME/onnxlibrary/macabi_release_v20230327_2320
- name: create release build
run: |
# Since Python 3.12, distutils is removed
# pip3 install setuptools
export PYTHONPATH=${{ github.workspace }}/tools/python:$PYTHONPATH
cd ${{ github.workspace }}/tools/python
ls ${{ github.workspace }}/tools/python
pip install -r ${{ github.workspace }}/requirements-dev.txt
pip install -r ${{ github.workspace }}/tools/ci_build/requirements.txt
#Deal with lSystem
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export LIBRARY_PATH="$LIBRARY_PATH:$SDKROOT/usr/lib"
#Build command
python ${{ github.workspace }}/tools/ci_build/github/apple/build_macabi_framework.py --config=Release --build_dir=$HOME/onnxlibrary/macabi_release_v20230327_2320 \
--include_ops_by_config=${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config \
--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