Skip to content

Re-enable compile support for all bytecode versions, massive bytecode refactor #219

Re-enable compile support for all bytecode versions, massive bytecode refactor

Re-enable compile support for all bytecode versions, massive bytecode refactor #219

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: d3352813ea44447bfbf135efdec23acc4d1d3f89
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_mbedtls_enabled=no module_enet_enabled=no module_mobile_vr_enabled=no module_upnp_enabled=no module_noise_enabled=no module_websocket_enabled=no use_static_cpp=yes builtin_freetype=yes builtin_libpng=yes builtin_zlib=yes builtin_libwebp=yes builtin_libvorbis=yes builtin_libogg=yes module_csg_enabled=yes module_gridmap_enabled=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.x86_64
export-preset: "macOS"
export-name: .export/gdre_tools.universal.zip
steps:
- name: checkout-godot
uses: actions/checkout@v3
with:
repository: godotengine/godot
ref: ${{env.GODOT_MAIN_SYNC_REF}}
- name: checkout-gdsdecomp
uses: actions/checkout@v3
with:
path: modules/gdsdecomp
fetch-depth: 0
- name: copy actions
shell: bash
run: |
cp -R modules/gdsdecomp/.github/actions/* .github/actions/
- name: Setup Godot build cache
uses: ./.github/actions/godot-cache
with:
cache-name: ${{ matrix.platform }}-editor-and-standalone
# Azure repositories are not reliable, we need to prevent azure giving us packages.
- 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
- 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: Compilation
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@v3
with:
name: GDRE_tools-editor-${{ matrix.platform }}
path: ${{github.workspace}}/bin/*
retention-days: 90
- name: Compile godot export template (x86_64)
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: Prepare template artifact
uses: ./.github/actions/godot-prepare-artifact
- name: Make macOS template
if: matrix.platform == 'macos'
run: |
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
mkdir .export
$proc = Start-Process -NoNewWindow -PassThru -FilePath "${{ matrix.command-export }}" -ArgumentList '--headless -e --quit'
Wait-Process -Id $proc.id -Timeout 300
$proc = Start-Process -NoNewWindow -PassThru -FilePath "${{ matrix.command-export }}" -ArgumentList '--headless --export-release "${{ matrix.export-preset }}" ${{ matrix.export-name }}'
Wait-Process -Id $proc.id -Timeout 300
- uses: actions/upload-artifact@v3
with:
name: GDRE_tools-standalone-${{ matrix.platform }}
path: ${{github.workspace}}/modules/gdsdecomp/standalone/.export/*
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@v3
with:
name: GDRE_tools-standalone-linux
path: artifacts/linux
- name: Download MacOS artifact
uses: actions/download-artifact@v3
with:
name: GDRE_tools-standalone-macos
path: artifacts/macos
- name: Download Windows artifact
uses: actions/download-artifact@v3
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