Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 74ea1ad

Browse files
committed
feat: add codesign for macos
1 parent 75cafe6 commit 74ea1ad

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

.github/workflows/python-package.yml

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Package Python Library
22

33
on:
44
push:
5-
branches: [ feat/python-package-ci ]
5+
branches: [ feat/codesign-python-package ]
66
workflow_dispatch:
77
inputs:
88
model_dir:
@@ -25,9 +25,9 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
include:
28-
- os: "linux"
29-
name: "amd64"
30-
runs-on: "ubuntu-20-04-cuda-12-0"
28+
# - os: "linux"
29+
# name: "amd64"
30+
# runs-on: "ubuntu-20-04-cuda-12-0"
3131
- os: "mac"
3232
name: "amd64"
3333
runs-on: "macos-selfhosted-12"
@@ -133,4 +133,41 @@ jobs:
133133
uses: actions/upload-artifact@v4
134134
with:
135135
name: ${{env.MODEL_NAME}}-${{ matrix.os }}-${{ matrix.name }}
136-
path: ${{env.PYTHON_FOLDER}}
136+
path: ${{env.PYTHON_FOLDER}}
137+
138+
codesign:
139+
runs-on: macos-latest
140+
needs: build-and-test
141+
steps:
142+
- name: checkout
143+
uses: actions/checkout@v3
144+
- uses: apple-actions/import-codesign-certs@v2
145+
continue-on-error: true
146+
with:
147+
p12-file-base64: ${{ secrets.CODE_SIGN_P12_BASE64 }}
148+
p12-password: ${{ secrets.CODE_SIGN_P12_PASSWORD }}
149+
- name: Download Artifact
150+
uses: actions/download-artifact@v4
151+
with:
152+
name: ${{env.MODEL_NAME}}-mac-amd64
153+
path: ${{env.MODEL_NAME}}-mac-amd64
154+
- name: Download Artifact
155+
uses: actions/download-artifact@v4
156+
with:
157+
name: ${{env.MODEL_NAME}}-mac-amd64
158+
path: ${{env.MODEL_NAME}}-mac-arm64
159+
160+
- run: |
161+
find "${{env.MODEL_NAME}}-mac-amd64" \( -type f -perm +111 \) -exec codesign --force --entitlements="./engine/templates/macos/entitlements.plist" -s "${{ secrets.DEVELOPER_ID }}" --options=runtime {} \;
162+
find "${{env.MODEL_NAME}}-mac-arm64" \( -type f -perm +111 \) -exec codesign --force --entitlements="./engine/templates/macos/entitlements.plist" -s "${{ secrets.DEVELOPER_ID }}" --options=runtime {} \;
163+
164+
- name: Upload Artifact
165+
uses: actions/upload-artifact@v4
166+
with:
167+
name: ${{env.MODEL_NAME}}-mac-amd64-signed
168+
path: ${{env.MODEL_NAME}}-mac-amd64
169+
- name: Upload Artifact
170+
uses: actions/upload-artifact@v4
171+
with:
172+
name: ${{env.MODEL_NAME}}-mac-arm64-signed
173+
path: ${{env.MODEL_NAME}}-mac-arm64

0 commit comments

Comments
 (0)