Merge pull request #216 from limbonaut/gha-debug-builds

GHA: Add an option to create GDExtension debug builds
This commit is contained in:
Serhii Snitsaruk 2024-09-15 16:23:08 +02:00 committed by GitHub
commit 601aed3684
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 18 additions and 8 deletions

View File

@ -11,7 +11,11 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit the number of test builds
type: boolean
default: false
debug-symbols:
description: Build with debug symbols
type: boolean type: boolean
default: false default: false
@ -26,14 +30,18 @@ on:
type: string type: string
default: master default: master
test-build: test-build:
description: Should we perform only a limited number of test builds? description: Limit the number of test builds
type: boolean
default: false
debug-symbols:
description: Build with debug symbols
type: boolean type: boolean
default: false default: false
# Global Settings # Global Settings
env: env:
SCONS_CACHE_LIMIT: 4096 SCONS_CACHE_LIMIT: 4096
SCONSFLAGS: dev_build=no debug_symbols=no SCONSFLAGS: use_mingw=yes dev_build=no
EM_VERSION: 3.1.45 EM_VERSION: 3.1.45
EM_CACHE_FOLDER: "emsdk-cache" EM_CACHE_FOLDER: "emsdk-cache"
GODOT_VERSION: 4.3-stable GODOT_VERSION: 4.3-stable
@ -250,23 +258,25 @@ jobs:
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ${{github.workspace}}/.scons_cache/ path: ${{github.workspace}}/.scons_cache/
key: ${{env.BIN}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} key: ${{env.BIN}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
restore-keys: | restore-keys: |
${{env.BIN}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} ${{env.BIN}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}}
${{env.BIN}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}} ${{env.BIN}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}
${{env.BIN}}-${{inputs.godot-cpp-ref}} ${{env.BIN}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}
- name: Compilation - name: Compilation
shell: bash shell: bash
env: env:
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ SCONS_CACHE: ${{github.workspace}}/.scons_cache/
DEBUG_FLAGS: ${{ inputs.debug-symbols && 'debug_symbols=yes symbols_visibility=visible' || 'debug_symbols=no' }}
run: | run: |
PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH
scons platform=${{matrix.opts.platform}} target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} ${{env.SCONSFLAGS}} scons platform=${{matrix.opts.platform}} target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} ${{env.DEBUG_FLAGS}} ${{env.SCONSFLAGS}}
- name: Prepare artifact - name: Prepare artifact
shell: bash shell: bash
run: | run: |
ls -R demo/addons/limboai/
mkdir out mkdir out
mv demo/addons/ out/ mv demo/addons/ out/
cp {README,LICENSE,LOGO_LICENSE}.md out/addons/limboai/ cp {README,LICENSE,LOGO_LICENSE}.md out/addons/limboai/