Skip to content

Commit 1e636d1

Browse files
committed
Attempt to add CI / CD.
1 parent e180aa5 commit 1e636d1

File tree

3 files changed

+298
-0
lines changed

3 files changed

+298
-0
lines changed

.github/workflows/godot-ci.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Credit to https://github.com/abarichello/godot-ci/
2+
name: "godot-ci export"
3+
on: push
4+
5+
env:
6+
GODOT_VERSION: 4.2.1
7+
EXPORT_NAME: project-evergreen
8+
PROJECT_PATH: .
9+
10+
jobs:
11+
export-windows:
12+
name: Windows Export
13+
runs-on: ubuntu-20.04
14+
container:
15+
image: barichello/godot-ci:4.3
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
lfs: true
21+
- name: Setup
22+
run: |
23+
mkdir -v -p ~/.local/share/godot/export_templates/
24+
mkdir -v -p ~/.config/
25+
mv /root/.config/godot ~/.config/godot
26+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
27+
- name: Windows Build
28+
run: |
29+
mkdir -v -p build/windows
30+
EXPORT_DIR="$(readlink -f build)"
31+
cd $PROJECT_PATH
32+
godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.exe"
33+
- name: Upload Artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: windows
37+
path: build/windows
38+
39+
export-linux:
40+
name: Linux Export
41+
runs-on: ubuntu-20.04
42+
container:
43+
image: barichello/godot-ci:4.3
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
with:
48+
lfs: true
49+
- name: Setup
50+
run: |
51+
mkdir -v -p ~/.local/share/godot/export_templates/
52+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
53+
- name: Linux Build
54+
run: |
55+
mkdir -v -p build/linux
56+
EXPORT_DIR="$(readlink -f build)"
57+
cd $PROJECT_PATH
58+
godot --headless --verbose --export-release "Linux/X11" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
59+
- name: Upload Artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: linux
63+
path: build/linux
64+
65+
export-mac:
66+
name: Mac Export
67+
runs-on: ubuntu-20.04
68+
container:
69+
image: barichello/godot-ci:4.3
70+
steps:
71+
- name: Checkout
72+
uses: actions/checkout@v4
73+
with:
74+
lfs: true
75+
- name: Setup
76+
run: |
77+
mkdir -v -p ~/.local/share/godot/export_templates/
78+
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
79+
- name: Mac Build
80+
run: |
81+
mkdir -v -p build/mac
82+
EXPORT_DIR="$(readlink -f build)"
83+
cd $PROJECT_PATH
84+
godot --headless --verbose --export-release "macOS" "$EXPORT_DIR/mac/$EXPORT_NAME.zip"
85+
- name: Upload Artifact
86+
uses: actions/upload-artifact@v4
87+
with:
88+
name: mac
89+
path: build/mac

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ export_presets.cfg
1313
.mono/
1414
data_*/
1515
mono_crash.*.json
16+
17+
.dist/

export_presets.cfg

Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
[preset.0]
2+
3+
name="Windows Desktop"
4+
platform="Windows Desktop"
5+
runnable=true
6+
dedicated_server=false
7+
custom_features=""
8+
export_filter="all_resources"
9+
include_filter=""
10+
exclude_filter=""
11+
export_path=""
12+
encryption_include_filters=""
13+
encryption_exclude_filters=""
14+
encrypt_pck=false
15+
encrypt_directory=false
16+
17+
[preset.0.options]
18+
19+
custom_template/debug=""
20+
custom_template/release=""
21+
debug/export_console_wrapper=1
22+
binary_format/embed_pck=false
23+
texture_format/bptc=true
24+
texture_format/s3tc=true
25+
texture_format/etc=false
26+
texture_format/etc2=false
27+
binary_format/architecture="x86_64"
28+
codesign/enable=false
29+
codesign/timestamp=true
30+
codesign/timestamp_server_url=""
31+
codesign/digest_algorithm=1
32+
codesign/description=""
33+
codesign/custom_options=PackedStringArray()
34+
application/modify_resources=true
35+
application/icon=""
36+
application/console_wrapper_icon=""
37+
application/icon_interpolation=4
38+
application/file_version=""
39+
application/product_version=""
40+
application/company_name=""
41+
application/product_name=""
42+
application/file_description=""
43+
application/copyright=""
44+
application/trademarks=""
45+
application/export_angle=0
46+
ssh_remote_deploy/enabled=false
47+
ssh_remote_deploy/host="user@host_ip"
48+
ssh_remote_deploy/port="22"
49+
ssh_remote_deploy/extra_args_ssh=""
50+
ssh_remote_deploy/extra_args_scp=""
51+
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
52+
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
53+
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
54+
$settings = New-ScheduledTaskSettingsSet
55+
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
56+
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
57+
Start-ScheduledTask -TaskName godot_remote_debug
58+
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
59+
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
60+
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
61+
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
62+
Remove-Item -Recurse -Force '{temp_dir}'"
63+
64+
[preset.1]
65+
66+
name="macOS"
67+
platform="macOS"
68+
runnable=true
69+
dedicated_server=false
70+
custom_features=""
71+
export_filter="all_resources"
72+
include_filter=""
73+
exclude_filter=""
74+
export_path=""
75+
encryption_include_filters=""
76+
encryption_exclude_filters=""
77+
encrypt_pck=false
78+
encrypt_directory=false
79+
80+
[preset.1.options]
81+
82+
export/distribution_type=1
83+
binary_format/architecture="universal"
84+
custom_template/debug=""
85+
custom_template/release=""
86+
debug/export_console_wrapper=1
87+
application/icon=""
88+
application/icon_interpolation=4
89+
application/bundle_identifier=""
90+
application/signature=""
91+
application/app_category="Games"
92+
application/short_version=""
93+
application/version=""
94+
application/copyright=""
95+
application/copyright_localized={}
96+
application/min_macos_version="10.12"
97+
application/export_angle=0
98+
display/high_res=true
99+
xcode/platform_build="14C18"
100+
xcode/sdk_version="13.1"
101+
xcode/sdk_build="22C55"
102+
xcode/sdk_name="macosx13.1"
103+
xcode/xcode_version="1420"
104+
xcode/xcode_build="14C18"
105+
codesign/codesign=1
106+
codesign/installer_identity=""
107+
codesign/apple_team_id=""
108+
codesign/identity=""
109+
codesign/entitlements/custom_file=""
110+
codesign/entitlements/allow_jit_code_execution=false
111+
codesign/entitlements/allow_unsigned_executable_memory=false
112+
codesign/entitlements/allow_dyld_environment_variables=false
113+
codesign/entitlements/disable_library_validation=false
114+
codesign/entitlements/audio_input=false
115+
codesign/entitlements/camera=false
116+
codesign/entitlements/location=false
117+
codesign/entitlements/address_book=false
118+
codesign/entitlements/calendars=false
119+
codesign/entitlements/photos_library=false
120+
codesign/entitlements/apple_events=false
121+
codesign/entitlements/debugging=false
122+
codesign/entitlements/app_sandbox/enabled=false
123+
codesign/entitlements/app_sandbox/network_server=false
124+
codesign/entitlements/app_sandbox/network_client=false
125+
codesign/entitlements/app_sandbox/device_usb=false
126+
codesign/entitlements/app_sandbox/device_bluetooth=false
127+
codesign/entitlements/app_sandbox/files_downloads=0
128+
codesign/entitlements/app_sandbox/files_pictures=0
129+
codesign/entitlements/app_sandbox/files_music=0
130+
codesign/entitlements/app_sandbox/files_movies=0
131+
codesign/entitlements/app_sandbox/files_user_selected=0
132+
codesign/entitlements/app_sandbox/helper_executables=[]
133+
codesign/custom_options=PackedStringArray()
134+
notarization/notarization=0
135+
privacy/microphone_usage_description=""
136+
privacy/microphone_usage_description_localized={}
137+
privacy/camera_usage_description=""
138+
privacy/camera_usage_description_localized={}
139+
privacy/location_usage_description=""
140+
privacy/location_usage_description_localized={}
141+
privacy/address_book_usage_description=""
142+
privacy/address_book_usage_description_localized={}
143+
privacy/calendar_usage_description=""
144+
privacy/calendar_usage_description_localized={}
145+
privacy/photos_library_usage_description=""
146+
privacy/photos_library_usage_description_localized={}
147+
privacy/desktop_folder_usage_description=""
148+
privacy/desktop_folder_usage_description_localized={}
149+
privacy/documents_folder_usage_description=""
150+
privacy/documents_folder_usage_description_localized={}
151+
privacy/downloads_folder_usage_description=""
152+
privacy/downloads_folder_usage_description_localized={}
153+
privacy/network_volumes_usage_description=""
154+
privacy/network_volumes_usage_description_localized={}
155+
privacy/removable_volumes_usage_description=""
156+
privacy/removable_volumes_usage_description_localized={}
157+
ssh_remote_deploy/enabled=false
158+
ssh_remote_deploy/host="user@host_ip"
159+
ssh_remote_deploy/port="22"
160+
ssh_remote_deploy/extra_args_ssh=""
161+
ssh_remote_deploy/extra_args_scp=""
162+
ssh_remote_deploy/run_script="#!/usr/bin/env bash
163+
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
164+
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
165+
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
166+
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
167+
rm -rf \"{temp_dir}\""
168+
169+
[preset.2]
170+
171+
name="Linux/X11"
172+
platform="Linux/X11"
173+
runnable=true
174+
dedicated_server=false
175+
custom_features=""
176+
export_filter="all_resources"
177+
include_filter=""
178+
exclude_filter=""
179+
export_path=""
180+
encryption_include_filters=""
181+
encryption_exclude_filters=""
182+
encrypt_pck=false
183+
encrypt_directory=false
184+
185+
[preset.2.options]
186+
187+
custom_template/debug=""
188+
custom_template/release=""
189+
debug/export_console_wrapper=1
190+
binary_format/embed_pck=false
191+
texture_format/bptc=true
192+
texture_format/s3tc=true
193+
texture_format/etc=false
194+
texture_format/etc2=false
195+
binary_format/architecture="x86_64"
196+
ssh_remote_deploy/enabled=false
197+
ssh_remote_deploy/host="user@host_ip"
198+
ssh_remote_deploy/port="22"
199+
ssh_remote_deploy/extra_args_ssh=""
200+
ssh_remote_deploy/extra_args_scp=""
201+
ssh_remote_deploy/run_script="#!/usr/bin/env bash
202+
export DISPLAY=:0
203+
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
204+
\"{temp_dir}/{exe_name}\" {cmd_args}"
205+
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
206+
kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
207+
rm -rf \"{temp_dir}\""

0 commit comments

Comments
 (0)