Skip to content

Commit 8f90235

Browse files
Update godot-cpp (4.3 cherry-picks); Add build profiles
- Updated godot-cpp submodule with latest cherry-picks for 4.3 - Added build profiles in CI builds, allowing the removal of dependencies that are not explicitly used by the GDExtension being built. This speeds up CI builds.
1 parent 05c64e7 commit 8f90235

File tree

7 files changed

+96
-17
lines changed

7 files changed

+96
-17
lines changed

.github/workflows/build_all.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ env:
1313
GODOT_ENGINE_VERSION: "4.3.0"
1414
GODOT_ENGINE_STAGE: "stable"
1515
INTEGRATION_VERSION: "3.0.0"
16+
BUILD_PROFILE_EDITOR: "build_profile_editor.json"
17+
BUILD_PROFILE_RUNTIME: "build_profile_runtime.json"
1618

1719
jobs:
1820
build-all:
@@ -208,7 +210,7 @@ jobs:
208210
run: |
209211
cd addons/Wwise/native
210212
mkdir -p godot-cpp/bin
211-
scons platform=${{ matrix.scons-platform }} target=editor wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk
213+
scons platform=${{ matrix.scons-platform }} target=editor wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk build_profile=${{ env.BUILD_PROFILE_EDITOR }}
212214
cd ../../../
213215
214216
- name: Compile template_debug library
@@ -219,7 +221,7 @@ jobs:
219221
SCONS_CACHE_LIMIT: 7168
220222
run: |
221223
cd addons/Wwise/native
222-
scons platform=${{ matrix.scons-platform }} target=template_debug wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk ${{ matrix.debug-flags }}
224+
scons platform=${{ matrix.scons-platform }} target=template_debug wwise_config=profile use_static_cpp=yes wwise_sdk=wwise_sdk build_profile=${{ env.BUILD_PROFILE_RUNTIME }} ${{ matrix.debug-flags }}
223225
cd ../../../
224226
225227
- name: Compile template_release library
@@ -230,7 +232,7 @@ jobs:
230232
SCONS_CACHE_LIMIT: 7168
231233
run: |
232234
cd addons/Wwise/native
233-
scons platform=${{ matrix.scons-platform }} target=template_release wwise_config=release use_static_cpp=yes wwise_sdk=wwise_sdk ${{ matrix.release-flags }}
235+
scons platform=${{ matrix.scons-platform }} target=template_release wwise_config=release use_static_cpp=yes wwise_sdk=wwise_sdk build_profile=${{ env.BUILD_PROFILE_RUNTIME }} ${{ matrix.release-flags }}
234236
cd ../../../
235237
236238
- name: Compile Android libraries
@@ -241,10 +243,10 @@ jobs:
241243
WWISESDK=$(pwd)
242244
cd ../godot-cpp
243245
mkdir -p bin
244-
scons platform=android target=template_debug dev_build=yes -j6 ${{ matrix.debug-flags-arm64 }}
245-
scons platform=android target=template_debug dev_build=yes -j6 ${{ matrix.debug-flags-arm32 }}
246-
scons platform=android target=template_release -j6 ${{ matrix.release-flags-arm64 }}
247-
scons platform=android target=template_release -j6 ${{ matrix.release-flags-arm32 }}
246+
scons platform=android target=template_debug dev_build=yes build_profile="../build_profile_runtime.json" -j6 ${{ matrix.debug-flags-arm64 }}
247+
scons platform=android target=template_debug dev_build=yes build_profile="../build_profile_runtime.json" -j6 ${{ matrix.debug-flags-arm32 }}
248+
scons platform=android target=template_release build_profile="../build_profile_runtime.json" -j6 ${{ matrix.release-flags-arm64 }}
249+
scons platform=android target=template_release build_profile="../build_profile_runtime.json" -j6 ${{ matrix.release-flags-arm32 }}
248250
cd ../android
249251
chmod +x ./gradlew
250252
./gradlew assemble -PWWISE_SDK="$WWISESDK"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"enabled_classes":[
3+
"AcceptDialog",
4+
"Area3D",
5+
"ArrayMesh",
6+
"BoxShape3D",
7+
"Button",
8+
"CollisionShape3D",
9+
"ConfigFile",
10+
"DirAccess",
11+
"DisplayServer",
12+
"EditorExportPlatform",
13+
"EditorExportPlugin",
14+
"EditorFileSystem",
15+
"EditorInspectorPlugin",
16+
"EditorInterface",
17+
"EditorNode3DGizmo",
18+
"EditorNode3DGizmoPlugin",
19+
"EditorPlugin",
20+
"EditorProperty",
21+
"EditorSettings",
22+
"Engine",
23+
"FileAccess",
24+
"HBoxContainer",
25+
"JSON",
26+
"LineEdit",
27+
"MeshDataTool",
28+
"MeshInstance3D",
29+
"Node2D",
30+
"Node3D",
31+
"OS",
32+
"PackedScene",
33+
"ProjectSettings",
34+
"ResourceLoader",
35+
"ResourceSaver",
36+
"SceneTree",
37+
"Script",
38+
"Shortcut",
39+
"StandardMaterial3D",
40+
"Texture2D",
41+
"Thread",
42+
"Time",
43+
"Timer",
44+
"Tree",
45+
"TreeItem",
46+
"VBoxContainer",
47+
"WorkerThreadPool"
48+
]
49+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"enabled_classes": [
3+
"Area3D",
4+
"ArrayMesh",
5+
"BoxShape3D",
6+
"CollisionShape3D",
7+
"DisplayServer",
8+
"Engine",
9+
"Material",
10+
"MeshDataTool",
11+
"MeshInstance3D",
12+
"Node2D",
13+
"Node3D",
14+
"OS",
15+
"ProjectSettings",
16+
"ResourceLoader",
17+
"SceneTree",
18+
"Texture2D",
19+
"Thread",
20+
"Window"
21+
]
22+
}

addons/Wwise/native/src/core/types/wwise_base_type.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
#if defined(TOOLS_ENABLED)
44
#include "editor/ak_editor_settings.h"
5+
#include <godot_cpp/classes/resource_saver.hpp>
56
#endif
67

78
#include "core/utils.h"
89
#include "core/wwise_object_type.h"
910
#include "editor/short_id_generator.h"
1011
#include <godot_cpp/classes/resource.hpp>
1112
#include <godot_cpp/classes/resource_loader.hpp>
12-
#include <godot_cpp/classes/resource_saver.hpp>
1313

1414
using namespace godot;
1515

addons/Wwise/native/src/core/types/wwise_event.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
#ifdef TOOLS_ENABLED
44
#include "editor/wwise_project_database.h"
5+
#include <godot_cpp/classes/editor_file_system.hpp>
6+
#include <godot_cpp/classes/editor_interface.hpp>
57
#endif
68

79
#include "core/types/wwise_base_type.h"
810
#include "core/wwise_gdextension.h"
9-
#include <godot_cpp/classes/editor_file_system.hpp>
10-
#include <godot_cpp/classes/editor_interface.hpp>
1111
#include <godot_cpp/classes/node3d.hpp>
1212

1313
using namespace godot;

addons/Wwise/native/src/core/utils.h

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
#pragma once
22

3-
#include "AK/SoundEngine/Common/AkTypes.h"
3+
#if defined(TOOLS_ENABLED)
44
#include <godot_cpp/classes/dir_access.hpp>
5+
#endif
6+
7+
#include "AK/SoundEngine/Common/AkTypes.h"
58
#include <godot_cpp/classes/engine.hpp>
69
#include <godot_cpp/classes/node.hpp>
710
#include <godot_cpp/variant/utility_functions.hpp>
@@ -329,6 +332,13 @@ static inline bool find_matching_vertex(Vector3 vertex, Dictionary vert_dict, in
329332
}
330333
}
331334

335+
336+
static inline AkGameObjectID get_ak_game_object_id(const Node* p_node)
337+
{
338+
return p_node == nullptr ? AK_INVALID_GAME_OBJECT : p_node->get_instance_id();
339+
}
340+
341+
#if defined(TOOLS_ENABLED)
332342
static bool make_dir_recursive(const String& p_directory)
333343
{
334344
if (!DirAccess::dir_exists_absolute(p_directory))
@@ -364,8 +374,4 @@ static PackedStringArray take(const PackedStringArray& folders, int n)
364374
}
365375
return result;
366376
}
367-
368-
static inline AkGameObjectID get_ak_game_object_id(const Node* p_node)
369-
{
370-
return p_node == nullptr ? AK_INVALID_GAME_OBJECT : p_node->get_instance_id();
371-
}
377+
#endif

0 commit comments

Comments
 (0)