-
Notifications
You must be signed in to change notification settings - Fork 39
192 lines (166 loc) · 6.53 KB
/
assemble_macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
name: 🍎 Assemble macOS
on:
workflow_call:
inputs:
godot-kotlin-jvm-version:
type: string
godot-version:
type: string
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}-macos_assemble
cancel-in-progress: true
jobs:
create-macos-editor-universal:
runs-on: macos-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Create universal editor binary release
target: release
editor-target-insert: ''
- name: Create universal editor binary debug
target: debug
editor-target-insert: ''
- name: Create universal editor binary dev
target: dev
editor-target-insert: '.dev'
steps:
- name: Clone Godot JVM module.
uses: actions/checkout@v4
- name: Download ${{ matrix.target }} x86_64 editor
uses: actions/download-artifact@v4
with:
name: editor_${{ matrix.target }}_macos_x86_64
path: "./"
- name: Download ${{ matrix.target }} arm64 editor
uses: actions/download-artifact@v4
with:
name: editor_${{ matrix.target }}_macos_arm64
path: "./"
- name: Create ${{ matrix.target }} OSX universal binary
uses: ./.github/actions/create-macos-universal-binary
with:
amd-64-binary: godot.macos.editor${{ matrix.editor-target-insert }}.x86_64
arm-64-binary: godot.macos.editor${{ matrix.editor-target-insert }}.arm64
universal-output-binary: godot.macos.editor.${{ matrix.target }}.universal
- name: Upload ${{ matrix.target }} macos universal artifact
uses: actions/upload-artifact@v4
with:
name: editor_${{ matrix.target }}_macos_universal
path: godot.macos.editor.${{ matrix.target }}.universal
create-macos-editor-app:
needs: [ create-macos-editor-universal ]
runs-on: macos-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Create editor app release
target: release
arch: universal
- name: Create editor app debug
target: debug
arch: universal
steps:
- name: Clone Godot Engine
uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{ inputs.godot-version }}
- name: Download ${{ matrix.target }} editor
uses: actions/download-artifact@v4
with:
name: editor_${{ matrix.target }}_macos_universal
path: .
- name: Download ${{ matrix.target }} bootstrap jar
uses: actions/download-artifact@v4
with:
name: jvm_godot-bootstrap_${{ matrix.target }}
path: .
- name: Create MacOs editor app
run: |
cp -r misc/dist/macos_tools.app ./Godot.app
mkdir -p Godot.app/Contents/MacOS
cp godot.macos.editor.${{ matrix.target }}.universal Godot.app/Contents/MacOS/Godot
chmod +x Godot.app/Contents/MacOS/Godot
cp godot-bootstrap.jar Godot.app/Contents/MacOS/
chmod +x Godot.app/Contents/MacOS/godot-bootstrap.jar
zip -q -9 -r godot-kotlin-jvm_editor_macos_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip Godot.app
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: godot-kotlin-jvm_editor_macos_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
path: godot-kotlin-jvm_editor_macos_${{ matrix.arch }}_${{ matrix.target }}_${{ inputs.godot-kotlin-jvm-version }}.zip
create-macos-export-template-universal:
runs-on: macos-latest
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Create export template universal binary release
target: release
- name: Create export template universal binary debug
target: debug
steps:
- name: Clone Godot JVM module.
uses: actions/checkout@v4
- name: Download ${{ matrix.target }} x86_64 export_template
uses: actions/download-artifact@v4
with:
name: export_template_${{ matrix.target }}_macos_x86_64
path: "./"
- name: Download ${{ matrix.target }} arm64 export_template
uses: actions/download-artifact@v4
with:
name: export_template_${{ matrix.target }}_macos_arm64
path: "./"
- name: Create macos universal binary
uses: ./.github/actions/create-macos-universal-binary
with:
amd-64-binary: godot.macos.template_${{ matrix.target }}.x86_64
arm-64-binary: godot.macos.template_${{ matrix.target }}.arm64
universal-output-binary: godot.macos.template_${{ matrix.target }}.universal
- name: Upload ${{ matrix.target }} macos universal artifact
uses: actions/upload-artifact@v4
with:
name: export_template_${{ matrix.target }}_macos_universal
path: godot.macos.template_${{ matrix.target }}.universal
create-macos-export-template-app:
needs: [ create-macos-export-template-universal ]
runs-on: macos-latest
name: Create macos export template app
steps:
- name: Clone Godot Engine
uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{ inputs.godot-version }}
- name: Download debug export_template
uses: actions/download-artifact@v4
with:
name: export_template_debug_macos_universal
path: .
- name: Download release export_template
uses: actions/download-artifact@v4
with:
name: export_template_release_macos_universal
path: .
- name: Create MacOs template app
run: |
cp -r misc/dist/macos_template.app .
mkdir -p macos_template.app/Contents/MacOS
cp godot.macos.template_release.universal macos_template.app/Contents/MacOS/godot_macos_release.universal
cp godot.macos.template_debug.universal macos_template.app/Contents/MacOS/godot_macos_debug.universal
chmod +x macos_template.app/Contents/MacOS/godot_macos*
zip -q -9 -r export_template_all_macos.zip macos_template.app
shell: bash
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: export_template_all_macos
path: export_template_all_macos.zip