Skip to content

Commit f248e98

Browse files
authored
Bobd/codesign mac (#6259)
* Test macos code signing for binaries * Adding dependency on signing job in pack
1 parent bc4d32e commit f248e98

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

.yamato/com.unity.ml-agents-pack.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
{% metadata_file .yamato/env.metafile -%}
2+
---
3+
14
pack:
25
name: Pack
36
agent:
@@ -21,3 +24,37 @@ pack:
2124
- "upm-ci~/packages/**/*"
2225
triggers:
2326
cancel_old_ci: true
27+
dependencies:
28+
- .yamato/com.unity.ml-agents-pack.yml#sign_macOS
29+
30+
sign_macOS:
31+
name: Sign MacOS Shared Libraries
32+
agent:
33+
type: Unity::VM::osx
34+
image: package-ci/macos-13:v4
35+
flavor: m1.mac
36+
sources:
37+
checkout_mode: sparse
38+
files:
39+
sparse_checkout_rules: .yamato/sparse-checkouts/upm-packages.txt
40+
commands:
41+
- brick_source: [email protected]:unity/[email protected]
42+
variables:
43+
CERTIFICATE_NAME: apple-developer-id-application-unity-technologies-sf
44+
- command: |-
45+
security unlock-keychain -p $UNITY_KEYCHAIN_PASSWORD /Users/$USER/Library/Keychains/login.keychain-db
46+
{% for package in packages -%}
47+
{% for shared_library in package.native_plugins.macOS -%}
48+
codesign --force --verify --verbose --timestamp --sign $(<certificate_thumbprint.txt) "{{ shared_library.path }}"
49+
codesign -d -vv "{{ shared_library.path }}"
50+
{% endfor -%}
51+
{% endfor -%}
52+
security lock-keychain /Users/$USER/Library/Keychains/login.keychain-db
53+
artifacts:
54+
{% for package in packages -%}
55+
{% for shared_library in package.native_plugins.macOS -%}
56+
{{ shared_library.name }}:
57+
paths:
58+
- "{{ shared_library.path }}"
59+
{% endfor -%}
60+
{% endfor -%}

.yamato/env.metafile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
packages:
2+
- name: com.unity.ml-agents
3+
short_name: ml-agents
4+
path: com.unity.ml-agents
5+
native_plugins:
6+
macOS:
7+
- name: libgrpc_macOS
8+
path: com.unity.ml-agents/Plugins/ProtoBuffer/runtimes/osx/native/libgrpc_csharp_ext.x64.bundle
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.github
2+
.yamato
3+
com.unity.ml-agents

.yamato/wrench/package-pack-jobs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ package_pack_-_ml-agents:
2121
packages:
2222
paths:
2323
- upm-ci~/packages/**/*
24+
dependencies:
25+
- path: .yamato/com.unity.ml-agents-pack.yml#sign_macOS
2426
variables:
2527
UPMCI_ACK_LARGE_PACKAGE: 1
2628
UPMPVP_CONTEXT_WRENCH: 0.10.5.0

0 commit comments

Comments
 (0)