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 b4ec7a4
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 149 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,23 @@ 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 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
Expand All @@ -37,15 +50,22 @@ jobs:
- name: Build Godot template for Linux
run: |
cd godot
scons p=linuxbsd arch=x86_64 optimize=speed ${BUILD_OPTIONS}
scons p=linuxbsd arch=x86_64 ${BUILD_OPTIONS}
- name: Export Godot
run: |
mkdir -v -p ~/${BUILD_NAME}
cd ~/editor
ls
./Godot_v${GODOT_VERSION}_linux.x86_64 --headless --export-release "${PLATFORM}" ~/${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
path: ~/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION}
if-no-files-found: error
retention-days: 1
retention-days: 14

build-windows:
name: Export GodSVG for Windows
Expand Down Expand Up @@ -104,12 +124,12 @@ jobs:
- name: Build Godot template for macOS (arm64 release)
run: |
cd godot
scons p=macos arch=arm64 optimize=speed ${BUILD_OPTIONS}
scons p=macos arch=arm64 ${BUILD_OPTIONS}
- name: Build Godot template for macOS (x86_64 release)
run: |
cd godot
scons p=macos arch=x86_64 optimize=speed ${BUILD_OPTIONS}
scons p=macos arch=x86_64 ${BUILD_OPTIONS}
- name: Combine binaries with lipo
run: |
Expand Down
4 changes: 2 additions & 2 deletions EXPORT_WORKFLOW.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ I couldn't get Github actions to generate the web template, unfortunately. So th
run: |
cd godot
source ../emsdk/emsdk_env.sh
scons p=web arch=wasm32 optimize=size lto=auto ${BUILD_OPTIONS}
scons p=web arch=wasm32 ${BUILD_OPTIONS}
- name: Upload artifact
uses: actions/upload-artifact@v4
Expand All @@ -69,7 +69,7 @@ I couldn't get Github actions to generate the web template, unfortunately. So th
- `git checkout <commit hash>`
- Read the documentation on how to set up scons for web: https://docs.godotengine.org/en/latest/contributing/development/compiling/compiling_for_web.html
- Use `scons p=list` to check if the web platform is set up.
- `scons p=web arch=wasm32 target=template_release lto=full production=yes dev_build=no optimize=size 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`
- `scons p=web arch=wasm32 target=template_release lto=full production=yes dev_build=no 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`
- Wait for it to finish. The template will be in the bin directory, but avoid moving it inside the GodSVG project.

## Exporting
Expand Down
4 changes: 2 additions & 2 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter="godot_only/*, web-build/*, *.md, *.icns"
exclude_filter="godot_only/*, *.md, *.icns, *.ico"
export_path=""
encryption_include_filters=""
encryption_exclude_filters=""
Expand All @@ -17,7 +17,7 @@ encrypt_directory=false
[preset.0.options]

custom_template/debug=""
custom_template/release=""
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
Expand Down

0 comments on commit b4ec7a4

Please sign in to comment.