Skip to content

Commit d0776ea

Browse files
authored
ci: Use self hosted arm64 macos runner (#16)
- Use python3.9 - Set --apple_deploy_target to 12
1 parent 24898da commit d0776ea

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

.github/workflows/wheel.yaml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030
with:
31-
repository: quadric-io/onnxruntime
32-
ref: ${{ inputs.onnxruntime_branch || github.ref }}
31+
repository: quadric-io/onnxruntime
32+
ref: ${{ inputs.onnxruntime_branch || github.ref }}
3333
- name: Build ONNX Runtime wheel
3434
working-directory: /workspace
3535
run: |
@@ -44,21 +44,16 @@ jobs:
4444
path: ${{ env.wheel_path }}
4545

4646
build_and_upload_wheel_mac:
47-
runs-on: macos-13-xl
47+
runs-on: [self-hosted, macOS, ARM64]
4848
steps:
4949
- name: Checkout repository
5050
uses: actions/checkout@v4
5151
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"
52+
repository: quadric-io/onnxruntime
53+
ref: ${{ inputs.onnxruntime_branch || github.ref }}
5854
- name: Build ONNX Runtime wheel
5955
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 --compile_no_warning_as_error
56+
./build.sh --build_wheel --config Release --parallel ${{ github.event_name == 'pull_request' && ' ' || '--skip_tests'}} --skip_submodule_sync --compile_no_warning_as_error --skip_submodule_sync --apple_deploy_target 12
6257
wheel_path=$(find . -name '*.whl' | xargs readlink -f)
6358
echo "wheel_path=$wheel_path" >> $GITHUB_ENV
6459
- name: Upload Artifact
@@ -68,17 +63,17 @@ jobs:
6863
path: ${{ env.wheel_path }}
6964

7065
create_release:
71-
if: github.ref == 'refs/heads/main' && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' )
72-
needs: [build_and_upload_wheel_linux, build_and_upload_wheel_mac]
66+
if: (github.ref == 'refs/heads/main') && ( github.event_name != 'workflow_call' && github.event_name != 'workflow_dispatch' )
67+
needs: [build_and_upload_wheel_mac, build_and_upload_wheel_linux]
7368
runs-on: ubuntu-latest
7469
steps:
7570
- name: Download ort-wheel-linux artifact
76-
uses: actions/download-artifact@v2
71+
uses: actions/download-artifact@v3
7772
with:
7873
name: ort-wheel-linux
7974
path: artifacts/
8075
- name: Download ort-wheel-mac artifact
81-
uses: actions/download-artifact@v2
76+
uses: actions/download-artifact@v3
8277
with:
8378
name: ort-wheel-mac
8479
path: artifacts/
@@ -87,7 +82,6 @@ jobs:
8782
env:
8883
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8984
run: |
90-
apt-get update && apt-get install curl jq -y
9185
count=$(curl --request GET \
9286
--url https://api.github.com/repos/${{ github.repository }}/releases \
9387
--header "Authorization: Bearer $GITHUB_TOKEN" | jq length)
@@ -100,5 +94,4 @@ jobs:
10094
tag_name: v${{ env.count }}
10195
name: Release v${{ env.count }}
10296
files: |
103-
artifacts/ort-wheel-linux/*.whl
104-
artifacts/ort-wheel-mac/*.whl
97+
artifacts/*.whl

0 commit comments

Comments
 (0)