From 22c16e9dc7a24690977f1dac483feecf3234ffc2 Mon Sep 17 00:00:00 2001 From: Paco Wong Date: Mon, 14 Oct 2024 21:30:57 +0800 Subject: [PATCH] Test build script --- .../generate-xcframework-maccatalyst.yml | 51 +++++++++++-------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/.github/workflows/generate-xcframework-maccatalyst.yml b/.github/workflows/generate-xcframework-maccatalyst.yml index c19b9a2e3d432..32a595239f469 100644 --- a/.github/workflows/generate-xcframework-maccatalyst.yml +++ b/.github/workflows/generate-xcframework-maccatalyst.yml @@ -25,32 +25,41 @@ jobs: - name: checkout repository uses: actions/checkout@v3 + - run: git checkout 67bc9438d7a5 + + # - 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: 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 + # - 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 + + - name: create releae 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 \ + python3 ${{ github.workspace }}/tools/ci_build/github/apple/build_apple_framework.py --config Release --build_dynamic_framework --build_dirr=$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 + --path_to_protoc_exe=/usr/local/bin/protoc ${{ github.workspace }}/tools/ci_build/github/apple/hws_mobile_package.required_operators.config