1919 - main
2020
2121jobs :
22- build_and_upload_wheel :
22+ build_and_upload_wheel_linux :
2323 runs-on : The_CTOs_Choice
2424 container :
2525 image : ghcr.io/quadric-io/tvm:devel
3737 ./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --allow_running_as_root
3838 wheel_path=$(find . -name '*.whl' | xargs readlink -f)
3939 echo "wheel_path=$wheel_path" >> $GITHUB_ENV
40+ - name : Upload Artifact
41+ uses : actions/upload-artifact@v3
42+ with :
43+ name : ort-wheel-linux
44+ path : ${{ env.wheel_path }}
45+
46+ build_and_upload_wheel_mac :
47+ runs-on : macos-13-xl
48+ steps :
49+ - name : Checkout repository
50+ uses : actions/checkout@v4
51+ with :
52+ repository : quadric-io/onnxruntime
53+ ref : ${{ inputs.onnxruntime_branch || github.ref }}
54+ - name : Set up Python 3.10
55+ uses : actions/setup-python@v4
56+ with :
57+ python-version : " 3.10"
58+ - name : Build ONNX Runtime wheel
59+ run : |
60+ python3 -m pip install wheel cmake numpy==1.24.4 packaging --upgrade
61+ ./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --allow_running_as_root
62+ wheel_path=$(find . -name '*.whl' | xargs readlink -f)
63+ echo "wheel_path=$wheel_path" >> $GITHUB_ENV
64+ - name : Upload Artifact
65+ uses : actions/upload-artifact@v3
66+ with :
67+ name : ort-wheel-mac
68+ path : ${{ env.wheel_path }}
69+
70+ create_release :
71+ if : github.ref == 'main' && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' )
72+ needs : [build_and_upload_wheel_linux, build_and_upload_wheel_mac]
73+ runs-on : ubuntu-latest
74+ steps :
75+ - name : Download ort-wheel-linux artifact
76+ uses : actions/download-artifact@v2
77+ with :
78+ name : ort-wheel-linux
79+ path : artifacts/
80+ - name : Download ort-wheel-mac artifact
81+ uses : actions/download-artifact@v2
82+ with :
83+ name : ort-wheel-mac
84+ path : artifacts/
4085 - name : Count releases
4186 id : count_releases
42- if : github.event_name != 'pull_request'
4387 env :
4488 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4589 run : |
@@ -48,17 +92,13 @@ jobs:
4892 --url https://api.github.com/repos/${{ github.repository }}/releases \
4993 --header "Authorization: Bearer $GITHUB_TOKEN" | jq length)
5094 echo "count=$count" >> $GITHUB_ENV
51- - name : Upload Artifact
52- uses : actions/upload-artifact@v3
53- with :
54- name : ort-wheel
55- path : ${{ env.wheel_path }}
56- - name : Create Release
57- if : github.ref == 'main' && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' )
95+ - name : Create Release and Upload Both Assets
5896 uses : softprops/action-gh-release@v1
5997 env :
6098 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
6199 with :
62100 tag_name : v${{ env.count }}
63101 name : Release v${{ env.count }}
64- files : ${{ env.wheel_path }}
102+ files : |
103+ artifacts/ort-wheel-linux/*.whl
104+ artifacts/ort-wheel-mac/*.whl
0 commit comments