Skip to content

Commit

Permalink
try to fix caching with pdbs
Browse files Browse the repository at this point in the history
  • Loading branch information
pkdawson committed Apr 20, 2024
1 parent a94db80 commit 55159d6
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/gdext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
- name: Build debug
run: |
cd gdext
scons
scons debug_symbols=yes
- name: Build release
run: |
cd gdext
scons target=template_release
scons debug_symbols=yes target=template_release
- name: Upload binaries
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -182,11 +182,11 @@ jobs:
rm *.exp
rm *.lib
# - name: Upload PDBs
# uses: actions/upload-artifact@v4
# with:
# name: pdbs
# path: addons/imgui-godot/bin/*.pdb
- name: Upload PDBs
uses: actions/upload-artifact@v4
with:
name: pdbs
path: addons/imgui-godot/bin/*.pdb

- name: Prepare files
id: prep
Expand Down
11 changes: 10 additions & 1 deletion gdext/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,18 @@ from pathlib import Path
import os
import shutil
import subprocess
import SCons

class CustomCacheDir(SCons.CacheDir.CacheDir):
@classmethod
def copy_to_cache(cls, env, src, dst) -> str:
if str(src).startswith("godot-cpp"):
return super().copy_to_cache(env, src, dst)
else:
return None

env = SConscript("godot-cpp/SConstruct")
env.CacheDir("scons_cache")
env.CacheDir("scons_cache", CustomCacheDir)
env.Append(CPPDEFINES=['IMGUI_USER_CONFIG="\\"imconfig-godot.h\\""', "IGN_EXPORT"])
env.Append(CPPPATH=["src/", "imgui/", "include/", "gen/"])
env.Replace(CXXFLAGS=str(env["CXXFLAGS"]).replace("c++17", "c++20"))
Expand Down

0 comments on commit 55159d6

Please sign in to comment.