Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AANT-2053] Build XCFramework for MacCatalyst #9

Merged
merged 35 commits into from
Nov 27, 2023
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5f81074
Run build command
Nov 25, 2023
3735ac5
Multiline command
Nov 25, 2023
2280b8b
Multiline command
Nov 25, 2023
a4cd5f7
Fix curl command
Nov 25, 2023
d8ea888
Fix output file path
Nov 25, 2023
b1a34d4
Use LJO in curl
Nov 25, 2023
08a2884
Unzip to destination folder
Nov 25, 2023
7f04420
Use Python 3
Nov 25, 2023
5f5e915
Correct indendation of multiline command
Nov 25, 2023
0bf94ad
Install package fromm requirements.txt
Nov 25, 2023
65fc168
Fix distutils in Python 3.12
Nov 25, 2023
8caaffa
Fix distutils in Python 3.12
Nov 25, 2023
d1be4f8
Downgrade Python
Nov 25, 2023
9260ae1
brew install python3
Nov 25, 2023
d1e9b49
Remove python from system
Nov 25, 2023
c3db518
Show python version
Nov 25, 2023
c3dc25c
Change python alias
Nov 25, 2023
5a550bc
Change python alias
Nov 25, 2023
6162fea
Change python alias
Nov 25, 2023
aedd660
List all python
Nov 25, 2023
fce64ae
List all python
Nov 25, 2023
80244b2
Overwrite link
Nov 25, 2023
887d6ee
brew uninstall new version of Pythons
Nov 25, 2023
e8d6ea4
brew switch python
Nov 25, 2023
acd01fd
Use rm to remove python link
Nov 25, 2023
8bb42cb
Cannot remove python
pacowong Nov 25, 2023
c1b4213
Use setup-python
pacowong Nov 25, 2023
0c4df60
Run build command in github.workspace
pacowong Nov 25, 2023
1d2a7cf
cd tools/python
pacowong Nov 25, 2023
ea0401b
Update generate-xcframework-maccatalyst.yml
pacowong Nov 25, 2023
efbab19
Add PYTHONPATH
pacowong Nov 25, 2023
26c53a5
Update absolute path
pacowong Nov 25, 2023
6bbff3c
ls ${{ github.workspace }}/tools/python
pacowong Nov 25, 2023
489b11a
Install flatbuffer
pacowong Nov 26, 2023
3c8f36a
Deal with missing lSystem: change LIBRARY_PATH
pacowong Nov 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/generate-xcframework-maccatalyst.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,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
Loading