Skip to content

Add support for decompressing Etc, Etc2, ASTC images #295

Add support for decompressing Etc, Etc2, ASTC images

Add support for decompressing Etc, Etc2, ASTC images #295

Workflow file for this run

name: Build Editor and Standalone
on:
push:
paths:
- "**"
- "!**.md"
- "!LICENSE"
- "!.scripts/clang_format.sh"
- "!.github/**"
- "!.vscode/**"
- ".github/actions/**"
- ".github/workflows/all_builds.yml"
pull_request:
paths:
- "**"
- "!**.md"
- "!LICENSE"
- "!.scripts/clang_format.sh"
- "!.github/**"
- "!.vscode/**"
- ".github/actions/**"
- ".github/workflows/all_builds.yml"
# Global Settings
# SCONS_CACHE for windows must be set in the build environment
env:
GODOT_BASE_BRANCH: master
# Change the README too
GODOT_MAIN_SYNC_REF: ef8d981267702de38ffc24136f9d823d31781c60
SCONSFLAGS: verbose=yes warnings=all werror=no module_text_server_fb_enabled=yes minizip=yes debug_symbols=no deprecated=yes
SCONSFLAGS_TEMPLATE: no_editor_splash=yes module_camera_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_websocket_enabled=no module_csg_enabled=yes module_gridmap_enabled=yes use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes disable_3d=no
SCONS_CACHE_MSVC_CONFIG: true
concurrency:
group: ci-${{github.actor}}-${{github.head_ref || github.run_number}}-${{github.ref}}
cancel-in-progress: true
jobs:
build:
# Windows 10 with latest image
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: "Windows"
os: "windows-latest"
platform: windows
sconsflags-template: ""
command-export: ${env:GITHUB_WORKSPACE}\bin\godot.windows.editor.x86_64.exe
export-preset: "Windows Desktop"
export-name: .export\gdre_tools.exe
- name: "🐧 Linux"
os: "ubuntu-20.04"
platform: linux
sconsflags-template: optimize=size use_lto=yes
command-export: ${env:GITHUB_WORKSPACE}/bin/godot.linuxbsd.editor.x86_64
export-preset: "Linux/X11"
export-name: .export/gdre_tools.x86_64
- name: "🍎 macOS"
os: "macos-latest"
platform: macos
sconsflags: use_volk=no vulkan_sdk_path=$VULKAN_SDK_PATH
sconsflags-template: optimize=size use_lto=yes use_volk=no vulkan_sdk_path=$VULKAN_SDK_PATH
command-export: ${env:GITHUB_WORKSPACE}/bin/godot.macos.editor.arm64
export-preset: "macOS"
export-name: .export/gdre_tools.universal.zip
steps:
- name: checkout-godot
uses: actions/checkout@v4
with:
repository: godotengine/godot
ref: ${{env.GODOT_MAIN_SYNC_REF}}
- name: checkout-gdsdecomp
uses: actions/checkout@v4
with:
path: modules/gdsdecomp
fetch-depth: 0
- name: copy actions
shell: bash
run: |
cp -R modules/gdsdecomp/.github/actions/* .github/actions/
- name: Restore Godot build cache
uses: ./.github/actions/godot-cache-restore
id: restore-cache
with:
cache-name: ${{ matrix.platform }}-editor-and-standalone
continue-on-error: true
- name: Install Linux deps
if: matrix.platform == 'linux'
run: |
sudo apt-get update
sudo apt-get install build-essential pkg-config libx11-dev libxcursor-dev \
libxinerama-dev libgl1-mesa-dev libglu-dev libasound2-dev libpulse-dev \
libudev-dev libxi-dev libxrandr-dev yasm clang-format-8
sudo apt-get install libwayland-bin
- name: Setup python and scons
uses: ./.github/actions/godot-deps
- name: Setup Vulkan SDK
if: matrix.platform == 'macos'
run: |
sh misc/scripts/install_vulkan_sdk_macos.sh
- name: Compile Editor
id: compile-editor
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }} ${{ matrix.sconsflags }}
platform: ${{ matrix.platform }}
target: editor
tests: false
scons-cache-limit: 4096
- name: Prepare artifact
uses: ./.github/actions/godot-prepare-artifact
- uses: actions/upload-artifact@v4
with:
name: GDRE_tools-editor-${{ matrix.platform }}
path: ${{github.workspace}}/bin/*
retention-days: 90
- name: Compile godot export template (x86_64)
id: compile-template
uses: ./.github/actions/godot-build
with:
sconsflags: arch=x86_64 ${{ env.SCONSFLAGS }} ${{ env.SCONSFLAGS_TEMPLATE }} ${{ matrix.sconsflags-template }}
platform: ${{ matrix.platform }}
target: template_release
tests: false
scons-cache-limit: 4096
- name: Compile godot export template for macos arm64
uses: ./.github/actions/godot-build
if: matrix.platform == 'macos'
with:
sconsflags: arch=arm64 ${{ env.SCONSFLAGS }} ${{ env.SCONSFLAGS_TEMPLATE }} ${{ matrix.sconsflags-template }}
platform: ${{ matrix.platform }}
target: template_release
tests: false
scons-cache-limit: 4096
- name: Save Godot build cache
if: success() || (steps.restore-cache.outputs.cache-hit == 'false' && steps.compile-editor.outcome != 'skipped' )
uses: ./.github/actions/godot-cache-save
with:
cache-name: ${{ matrix.platform }}-editor-and-standalone
continue-on-error: true
- name: Prepare template artifact
uses: ./.github/actions/godot-prepare-artifact
- name: Make macOS template
if: matrix.platform == 'macos'
run: |
cp -R "misc/dist/macos_template.app" "bin/"
mkdir -p "bin/macos_template.app/Contents/MacOS"
lipo -create bin/godot.macos.template_release.x86_64 bin/godot.macos.template_release.arm64 -output bin/godot.macos.template_release.universal
cp "bin/godot.macos.template_release.universal" "bin/macos_template.app/Contents/MacOS/godot_macos_debug.universal"
cp "bin/godot.macos.template_release.universal" "bin/macos_template.app/Contents/MacOS/godot_macos_release.universal"
cd bin/
zip -r9 "macos.zip" "macos_template.app/"
cd ..
- name: Download rcedit.exe
uses: robinraju/[email protected]
if: matrix.platform == 'windows'
with:
repository: electron/rcedit
latest: true
fileName: rcedit-x64.exe
out-file-path: ${{ runner.tool_cache }}/rcedit
- name: Setup rcedit
if: matrix.platform == 'windows'
run: |
Rename-Item ${{ runner.tool_cache }}\rcedit\rcedit-x64.exe ${{ runner.tool_cache }}\rcedit\rcedit.exe
echo "${{ runner.tool_cache }}\rcedit" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Export standalone GDRE Tools
shell: pwsh
run: |
cd ${{github.workspace}}/modules/gdsdecomp/standalone
pwsh -File ${{github.workspace}}/modules/gdsdecomp/.scripts/export.ps1 "${{ matrix.export-preset }}" -path "${{ matrix.export-name }}"
- uses: actions/upload-artifact@v4
with:
name: GDRE_tools-standalone-${{ matrix.platform }}
path: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/*
if-no-files-found: error
include-hidden-files: true
retention-days: 90
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: "ubuntu-20.04"
permissions:
contents: write
needs: build
steps:
- name: Download Linux artifact
uses: actions/download-artifact@v4
with:
name: GDRE_tools-standalone-linux
path: artifacts/linux
- name: Download MacOS artifact
uses: actions/download-artifact@v4
with:
name: GDRE_tools-standalone-macos
path: artifacts/macos
- name: Download Windows artifact
uses: actions/download-artifact@v4
with:
name: GDRE_tools-standalone-windows
path: artifacts/windows
- name: Zip artifacts
run: |
ls -la artifacts/*
cd artifacts/windows
zip -r9 "../GDRE_tools-${{ github.ref_name }}-windows.zip" *
cd ../..
mv "artifacts/macos/gdre_tools.universal.zip" "artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip"
cd artifacts/linux
zip -r9 "../GDRE_tools-${{ github.ref_name }}-linux.zip" *
- name: Release
uses: nikitalita/[email protected]
with:
files: |
artifacts/GDRE_tools-${{ github.ref_name }}-windows.zip
artifacts/GDRE_tools-${{ github.ref_name }}-macos.zip
artifacts/GDRE_tools-${{ github.ref_name }}-linux.zip