diff --git a/.github/actions/godot-export/action.yml b/.github/actions/godot-export/action.yml deleted file mode 100644 index 9cd47142..00000000 --- a/.github/actions/godot-export/action.yml +++ /dev/null @@ -1,9 +0,0 @@ -name: Export Godot project -runs: - using: composite - steps: - - name: Export - shell: bash - run: | - mkdir -v -p ~/build/${BUILD_NAME} - godot --headless --export-release "${PLATFORM}" ~/build/${BUILD_NAME}/${PROJECT_NAME}.${EXTENSION} diff --git a/.github/actions/set-up-godot/action.yml b/.github/actions/set-up-godot/action.yml deleted file mode 100644 index 06dee166..00000000 --- a/.github/actions/set-up-godot/action.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Set up Godot -runs: - using: composite - steps: - - name: Make folders - shell: bash - run: | - # Set up folders for Godot editor and export templates. - # This is done before the download step because this uses caching and doesn't always need to download. - # The ~/godot directory is for the editor, so it can be added to PATH. - mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable - mkdir -v -p ~/godot - - name: Use cache - id: godot-cache - uses: - actions/cache@v4 - with: - key: ${{ env.GODOT_VERSION }}-stable - path: | - ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable - ~/godot - - name: Download Godot - if: ${{ steps.godot-cache.outputs.cache-hit != 'true' }} - shell: bash - run: | - # Download Godot editor and export templates from godot-builds repo. - wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_export_templates.tpz & - wget -q https://github.com/godotengine/godot-builds/releases/download/${GODOT_VERSION}-stable/Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip & - wait - # Unpack the files. - unzip Godot_v${GODOT_VERSION}-stable_linux.x86_64.zip -d ~ & - unzip Godot_v${GODOT_VERSION}-stable_export_templates.tpz -d ~ & - wait - # Move to correct places. - mv ~/templates/* ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable - mv ~/Godot_v${GODOT_VERSION}-stable_linux.x86_64 ~/godot/godot - - name: Add Godot to path - shell: bash - run: echo "~/godot" >> $GITHUB_PATH diff --git a/.github/workflows/dev-desktop.yml b/.github/workflows/dev-desktop.yml deleted file mode 100644 index ea451803..00000000 --- a/.github/workflows/dev-desktop.yml +++ /dev/null @@ -1,87 +0,0 @@ -name: dev-desktop - -on: - workflow_dispatch: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -env: - GODOT_VERSION: 4.2.2 - PROJECT_NAME: GodSVG - -jobs: - export-windows: - name: Export GodSVG for Windows - runs-on: ubuntu-latest - env: - PLATFORM: "Windows Desktop" - EXTENSION: "exe" - BUILD_NAME: "windows-64bit" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up Godot - uses: ./.github/actions/set-up-godot - - - name: Set up WINE and rcedit for Windows export - run: | - # Download rcedit and install wine. - wget -q https://github.com/electron/rcedit/releases/download/v1.1.1/rcedit-x64.exe - sudo apt update - sudo apt install -y --fix-missing wine64 - # Move rcedit to different place. - mkdir -v -p ~/.local/share/rcedit - mv rcedit-x64.exe ~/.local/share/rcedit - # CD out of project directory so Godot doesn't load it. - cd ~ - # Run Godot to generate editor config file. - godot --headless --quit - # Add wine and rcedit paths to Godot config. - echo 'export/windows/wine = "/usr/bin/wine64"' >> ~/.config/godot/editor_settings-4.tres - echo 'export/windows/rcedit = "/home/runner/.local/share/rcedit/rcedit-x64.exe"' >> ~/.config/godot/editor_settings-4.tres - - - name: Export project - uses: ./.github/actions/godot-export - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.BUILD_NAME }} - path: ~/build/${{ env.BUILD_NAME }}/ - if-no-files-found: error - retention-days: 14 - - export-linux: - name: Export GodSVG for Linux - runs-on: ubuntu-latest - env: - PLATFORM: "Linux/X11" - EXTENSION: "x86_64" - BUILD_NAME: "linux-64bit" - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Set up Godot - uses: ./.github/actions/set-up-godot - - - name: Export project - uses: ./.github/actions/godot-export - - - name: Make Linux export runnable - run: | - # Set run permission. - chmod +x ~/build/${BUILD_NAME}/${PROJECT_NAME}.x86_64 - cd ~/build - tar zcvf ${BUILD_NAME}.tar.gz ${BUILD_NAME} - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.BUILD_NAME }} - path: ~/build/${{ env.BUILD_NAME }}.tar.gz - if-no-files-found: error - retention-days: 14 diff --git a/.github/workflows/export-optimized.yml b/.github/workflows/export-desktop.yml similarity index 77% rename from .github/workflows/export-optimized.yml rename to .github/workflows/export-desktop.yml index 948a7dd3..16bb6df8 100644 --- a/.github/workflows/export-optimized.yml +++ b/.github/workflows/export-desktop.yml @@ -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: @@ -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 @@ -37,15 +50,20 @@ 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} + ./~/editor/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 @@ -104,12 +122,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: | diff --git a/EXPORT_WORKFLOW.md b/EXPORT_WORKFLOW.md index 27c58bc8..99079d17 100644 --- a/EXPORT_WORKFLOW.md +++ b/EXPORT_WORKFLOW.md @@ -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 @@ -69,7 +69,7 @@ I couldn't get Github actions to generate the web template, unfortunately. So th - `git checkout ` - 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 diff --git a/export_presets.cfg b/export_presets.cfg index 858a3f1b..c254f6c9 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -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="" @@ -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