From 12f94db55a6ac107a88981aed956d48e16f3634b Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Wed, 18 Dec 2024 10:17:27 +0100 Subject: [PATCH] debug symbols for editor builds --- .github/workflows/gdextension.yml | 88 ++++++++++++++++--------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/.github/workflows/gdextension.yml b/.github/workflows/gdextension.yml index 52f7817..6a45ede 100644 --- a/.github/workflows/gdextension.yml +++ b/.github/workflows/gdextension.yml @@ -41,7 +41,7 @@ on: # Global Settings env: SCONS_CACHE_LIMIT: 4096 - SCONSFLAGS: use_mingw=yes dev_build=no debug_symbols=yes symbols_visibility=visible verbose=yes + SCONSFLAGS: use_mingw=yes dev_build=no verbose=yes EM_VERSION: 3.1.45 EM_CACHE_FOLDER: "emsdk-cache" GODOT_VERSION: 4.3-stable @@ -61,6 +61,7 @@ jobs: platform: linux target: template_release arch: x86_64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.linux.template_release.x86_64.so should-build: true @@ -69,6 +70,7 @@ jobs: platform: linux target: editor arch: x86_64 + debug-symbols: true bin: liblimboai.linux.editor.x86_64.so should-build: true @@ -77,6 +79,7 @@ jobs: platform: windows target: template_release arch: x86_64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.windows.template_release.x86_64.dll should-build: true @@ -85,6 +88,7 @@ jobs: platform: windows target: editor arch: x86_64 + debug-symbols: true bin: liblimboai.windows.editor.x86_64.dll should-build: true @@ -93,6 +97,7 @@ jobs: platform: macos target: template_release arch: universal + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.macos.template_release should-build: true @@ -101,6 +106,7 @@ jobs: platform: macos target: editor arch: universal + debug-symbols: true bin: liblimboai.macos.editor should-build: true @@ -109,6 +115,7 @@ jobs: platform: web target: template_release arch: wasm32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.web.template_release.wasm32.wasm should-build: ${{ !inputs.test-build }} @@ -117,6 +124,7 @@ jobs: platform: web target: template_debug arch: wasm32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.web.template_debug.wasm32.wasm should-build: ${{ !inputs.test-build }} @@ -125,6 +133,7 @@ jobs: platform: android target: template_release arch: arm64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_release.arm64.so should-build: ${{ !inputs.test-build }} @@ -133,6 +142,7 @@ jobs: platform: android target: template_debug arch: arm64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_debug.arm64.so should-build: ${{ !inputs.test-build }} @@ -141,6 +151,7 @@ jobs: platform: android target: template_release arch: arm32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_release.arm32.so should-build: ${{ !inputs.test-build }} @@ -149,6 +160,7 @@ jobs: platform: android target: template_debug arch: arm32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_debug.arm32.so should-build: ${{ !inputs.test-build }} @@ -157,6 +169,7 @@ jobs: platform: android target: template_release arch: x86_64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_release.x86_64.so should-build: ${{ !inputs.test-build }} @@ -165,6 +178,7 @@ jobs: platform: android target: template_debug arch: x86_64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_debug.x86_64.so should-build: ${{ !inputs.test-build }} @@ -173,6 +187,7 @@ jobs: platform: android target: template_release arch: x86_32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_release.x86_32.so should-build: ${{ !inputs.test-build }} @@ -181,6 +196,7 @@ jobs: platform: android target: template_debug arch: x86_32 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.android.template_debug.x86_32.so should-build: ${{ !inputs.test-build }} @@ -189,6 +205,7 @@ jobs: platform: ios target: template_release arch: arm64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.ios.template_release.arm64.dylib should-build: ${{ !inputs.test-build }} @@ -197,6 +214,7 @@ jobs: platform: ios target: template_debug arch: arm64 + debug-symbols: ${{ inputs.debug-symbols }} bin: liblimboai.ios.template_debug.arm64.dylib should-build: ${{ !inputs.test-build }} @@ -205,6 +223,7 @@ jobs: platform: ios target: template_release arch: universal + debug-symbols: ${{ inputs.debug-symbols }} scons-flags: ios_simulator=yes bin: liblimboai.ios.template_release.universal.simulator.dylib should-build: ${{ !inputs.test-build }} @@ -214,6 +233,7 @@ jobs: platform: ios target: template_debug arch: universal + debug-symbols: ${{ inputs.debug-symbols }} scons-flags: ios_simulator=yes bin: liblimboai.ios.template_debug.universal.simulator.dylib should-build: ${{ !inputs.test-build }} @@ -274,7 +294,6 @@ jobs: if: matrix.opts.platform == 'web' run: | emcc -v - llvm-objcopy --help - name: Set up scons if: matrix.opts.platform != 'linux' @@ -303,11 +322,11 @@ jobs: uses: actions/cache@v4 with: path: ${{github.workspace}}/.scons_cache/ - key: ${{matrix.opts.bin}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + key: ${{matrix.opts.bin}}-${{matrix.opts.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} restore-keys: | - ${{matrix.opts.bin}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} - ${{matrix.opts.bin}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}} - ${{matrix.opts.bin}}-${{inputs.debug-symbols}}-${{inputs.godot-cpp-ref}} + ${{matrix.opts.bin}}-${{matrix.opts.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}}-${{env.LIMBOAI_VERSION}} + ${{matrix.opts.bin}}-${{matrix.opts.debug-symbols}}-${{inputs.godot-cpp-ref}}-${{inputs.limboai-ref}} + ${{matrix.opts.bin}}-${{matrix.opts.debug-symbols}}-${{inputs.godot-cpp-ref}} - name: Set up MinGW if: matrix.opts.platform == 'windows' @@ -319,13 +338,13 @@ jobs: shell: bash env: SCONS_CACHE: ${{github.workspace}}/.scons_cache/ - DEBUG_FLAGS: ${{ inputs.debug-symbols && 'debug_symbols=yes symbols_visibility=visible' || 'debug_symbols=no' }} + DEBUG_FLAGS: ${{ matrix.opts.debug-symbols && 'debug_symbols=yes symbols_visibility=visible' || 'debug_symbols=no' }} run: | PATH=${GITHUB_WORKSPACE}/buildroot/bin:$PATH scons platform=${{matrix.opts.platform}} target=${{matrix.opts.target}} arch=${{matrix.opts.arch}} ${{env.DEBUG_FLAGS}} ${{matrix.opts.scons-flags}} ${{env.SCONSFLAGS}} - name: Split debug symbols (Linux) - if: inputs.debug-symbols && matrix.opts.platform == 'linux' + if: matrix.opts.debug-symbols && matrix.opts.platform == 'linux' shell: bash run: | cd demo/addons/limboai/bin/ @@ -336,7 +355,7 @@ jobs: nm ${{matrix.opts.bin}} - name: Split debug symbols (Windows) - if: inputs.debug-symbols && matrix.opts.platform == 'windows' + if: matrix.opts.debug-symbols && matrix.opts.platform == 'windows' shell: bash run: | cd demo/addons/limboai/bin/ @@ -346,7 +365,7 @@ jobs: x86_64-w64-mingw32-nm ${{matrix.opts.bin}} - name: Split debug symbols (macOS & iOS) - if: inputs.debug-symbols && (matrix.opts.platform == 'macos' || matrix.opts.platform == 'ios') + if: matrix.opts.debug-symbols && (matrix.opts.platform == 'macos' || matrix.opts.platform == 'ios') shell: bash run: | cd demo/addons/limboai/bin/ @@ -357,20 +376,6 @@ jobs: strip -x ${{matrix.opts.bin}} nm ${{matrix.opts.bin}} - - name: Split debug symbols (Web) - if: inputs.debug-symbols && matrix.opts.platform == 'web' - shell: bash - run: | - emstrip --only-keep-debug -o ${{matrix.opts.bin}}.debug ${{matrix.opts.bin}} - emstrip --strip-debug ${{matrix.opts.bin}} - llvm-objcopy --add-gnu-debuglink ${{matrix.opts.bin}}.debug ${{matrix.opts.bin}} - - - name: Split debug symbols (Android) - if: inputs.debug-symbols && matrix.opts.platform == 'android' - shell: bash - run: | - cd demo/addons/limboai/bin/ - - name: Prepare artifact shell: bash run: | @@ -391,19 +396,16 @@ jobs: name: tmp-gdextension.${{matrix.opts.platform}}.${{matrix.opts.target}}.${{matrix.opts.arch}} path: | out/* - !out/**/*.debug - !out/**/*.pdb - !out/**/*.dSYM - - name: Upload debug symbols - if: inputs.debug-symbols - uses: actions/upload-artifact@v4 - with: - name: tmp-gdextension-symbols.${{matrix.opts.platform}}.${{matrix.opts.target}}.${{matrix.opts.arch}} - path: | - out/**/*.debug - out/**/*.pdb - out/**/*.dSYM + # - name: Upload debug symbols + # if: matrix.opts.debug-symbols + # uses: actions/upload-artifact@v4 + # with: + # name: tmp-gdextension-symbols.${{matrix.opts.platform}}.${{matrix.opts.target}}.${{matrix.opts.arch}} + # path: | + # out/**/*.debug + # out/**/*.pdb + # out/**/*.dSYM package-extension: name: 📦 Package extension @@ -418,13 +420,13 @@ jobs: pattern: tmp-gdextension.* delete-merged: true - - name: Merge debug symbols artifacts - if: inputs.debug-symbols - uses: actions/upload-artifact/merge@v4 - with: - name: ${{needs.gdextension.outputs.name-prefix}}.debug-symbols - pattern: tmp-gdextension-symbols.* - delete-merged: true + # - name: Merge debug symbols artifacts + # if: inputs.debug-symbols + # uses: actions/upload-artifact/merge@v4 + # with: + # name: ${{needs.gdextension.outputs.name-prefix}}.debug-symbols + # pattern: tmp-gdextension-symbols.* + # delete-merged: true - name: Download artifact uses: actions/download-artifact@v4