Skip to content

Commit

Permalink
Attempt to automate the export process more
Browse files Browse the repository at this point in the history
  • Loading branch information
MewPurPur committed Jun 7, 2024
1 parent a7e9136 commit 8d1942a
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 590 deletions.
9 changes: 0 additions & 9 deletions .github/actions/godot-export/action.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/actions/set-up-godot/action.yml

This file was deleted.

87 changes: 0 additions & 87 deletions .github/workflows/dev-desktop.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: export-optimized
name: export-desktop

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
GODOT_VERSION: 4.2.2
GODOT_VERSION: 4.3-beta1
PROJECT_NAME: GodSVG
GODOT_REPO: https://github.com/godotengine/godot.git
GODOT_COMMIT_HASH: 15073af
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:
Expand All @@ -16,14 +20,16 @@ jobs:
runs-on: ubuntu-latest
env:
PLATFORM: "Linux/X11"
EXTENSION: "exe"
EXTENSION: "x86_64"
BUILD_NAME: "linux-64bit"
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install dependencies
run: sudo apt install -y scons python3
run: |
sudo apt update
sudo apt install -y python3 wget unzip
- name: Clone Godot repository
run: git clone $GODOT_REPO godot
Expand All @@ -39,13 +45,93 @@ jobs:
cd godot
scons p=linuxbsd arch=x86_64 optimize=speed ${BUILD_OPTIONS}
- 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: Add Godot to path
run: echo "::add-path::~/editor/Godot_v${GODOT_VERSION}_linux.x86_64"

- 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: |
mkdir -v -p ~/build/${BUILD_NAME}
godot --headless --export "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: godot_template_linux.x86_64
path: godot/bin/godot.linuxbsd.template_release.x86_64
if-no-files-found: error
retention-days: 1
retention-days: 14

build-windows:
name: Export GodSVG for Windows
Expand Down
Loading

0 comments on commit 8d1942a

Please sign in to comment.