-
-
Notifications
You must be signed in to change notification settings - Fork 53
220 lines (192 loc) · 7.69 KB
/
export-desktop.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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
name: export-desktop
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
GODOT_VERSION: 4.3-beta1
PROJECT_NAME: GodSVG
GODOT_REPO: https://github.com/godotengine/godot.git
GODOT_COMMIT_HASH: a4f2ea91a
BUILD_OPTIONS: target=template_release lto=full production=yes deprecated=no minizip=no brotli=no vulkan=no openxr=no use_volk=no disable_3d=yes modules_enabled_by_default=no module_freetype_enabled=yes module_gdscript_enabled=yes module_svg_enabled=yes module_jpg_enabled=yes module_text_server_adv_enabled=yes graphite=no module_webp_enabled=yes
jobs:
build-linux:
name: Export GodSVG for Linux
runs-on: ubuntu-latest
env:
PLATFORM: "Linux/X11"
EXTENSION: "x86_64"
BUILD_NAME: "linux-64bit"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y scons python3 wget unzip
- name: Install editor
run: |
mkdir -p ~/editor
cd ~/editor
wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}/Godot_v${GODOT_VERSION}_linux.x86_64.zip
unzip Godot_v${GODOT_VERSION}_linux.x86_64.zip -d ~/editor
- name: Clone Godot repository
run: git clone $GODOT_REPO godot
- name: Checkout specific commit
run: |
cd godot
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for Linux
run: |
cd godot
scons p=linuxbsd arch=x86_64 optimize=speed ${BUILD_OPTIONS}
- name: Create export_presets.cfg
run: |
cat <<EOF > export_presets.cfg
[preset.0]
name="Linux/X11"
platform="Linux/X11"
runnable=true
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="godot_only/*, web-build/*, *.md, *.icns"
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
encrypt_pck=false
encrypt_directory=false
[preset.0.options]
custom_template/debug=""
custom_template/release="../godot/bin/godot.linuxbsd.template_release.x86_64"
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/bptc=true
texture_format/s3tc=true
texture_format/etc=false
texture_format/etc2=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name="GodSVG contributors"
application/product_name="GodSVG"
application/file_description="GodSVG"
application/copyright="2023-present GodSVG contributors"
application/trademarks=""
application/export_angle=0
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"
EOF
- name: Export Godot
run: |
cd ~/editor
mkdir -v -p ~/build/${BUILD_NAME}
./Godot_v${GODOT_VERSION}_linux.x86_64 --headless --export-release "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: godot_template_linux.x86_64
path: ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
if-no-files-found: error
retention-days: 14
build-windows:
name: Export GodSVG for Windows
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt install -y scons python3
sudo apt install -y g++-mingw-w64-x86-64-posix
- name: Clone Godot repository
run: git clone $GODOT_REPO godot
- name: Checkout specific commit
run: |
cd godot
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for Windows
run: |
apt search mingw
cd godot
scons p=windows target=release_debug tools=no ${BUILD_OPTIONS}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: godot_template_windows.exe
path: godot/bin/godot.windows.template_release.x86_64.exe
if-no-files-found: error
retention-days: 1
build-macos:
name: Export GodSVG for MacOS
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: brew install scons
- name: Clone Godot repository
run: git clone $GODOT_REPO godot
- name: Checkout specific commit
run: |
cd godot
git fetch
git checkout $GODOT_COMMIT_HASH
- name: Build Godot template for macOS (arm64 release)
run: |
cd godot
scons p=macos arch=arm64 optimize=speed ${BUILD_OPTIONS}
- name: Build Godot template for macOS (x86_64 release)
run: |
cd godot
scons p=macos arch=x86_64 optimize=speed ${BUILD_OPTIONS}
- name: Combine binaries with lipo
run: |
cd godot/bin
lipo -create godot.macos.template_release.x86_64 godot.macos.template_release.arm64 -output godot.macos.template_release.universal
chmod +x *
- name: Prepare .app bundle
run: |
cd godot/bin
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;
chmod +x macos_template.app/Contents/MacOS/godot_macos*;
zip -q -9 -r godot_template_macos.zip macos_template.app;
- name: Upload macOS template
uses: actions/upload-artifact@v3
with:
name: godot_template_macos.zip
path: godot/bin/godot_template_macos.zip
if-no-files-found: error
retention-days: 1