CesiumGS / cesium-unreal

Bringing the 3D geospatial ecosystem to Unreal Engine
https://cesium.com/platform/cesium-for-unreal/
Apache License 2.0
879 stars 285 forks source link

Need CI support for downloaded plugin builds #1469

Open csciguy8 opened 4 days ago

csciguy8 commented 4 days ago

Some users download our released plugin, put in it their project, Unreal Editor is rebuilding it for them, and the build fails.

One example is on the forum here.

Although the forum issue was solved, we need to be able to catch errors like this on CI before we release.


It's possible to reproduce this locally by doing this..

In this case, the build failed, and produced messages like this in the log...

Building UnrealEditor...
Using Visual Studio 2022 14.38.33135 toolchain (C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.38.33130) and Windows 10.0.22621.0 SDK (C:\Program Files (x86)\Windows Kits\10).
[Adaptive Build] Excluded from CesiumRuntime unity file: CalcBounds.cpp, Cesium3DTileset.cpp, Cesium3DTilesetRoot.cpp, CesiumActors.cpp, CesiumBingMapsRasterOverlay.cpp, CesiumBoundingVolumeComponent.cpp, CesiumCamera.cpp, CesiumCameraManager.cpp, ...
...
[21/142] Compile [x64] Cesium3DTilesetRoot.cpp
[22/142] Compile [x64] CesiumBoundingVolumeComponent.cpp
[23/142] Compile [x64] CesiumGlobeAnchorComponent.cpp
C:\Users\SomeUser\Documents\Unreal Projects\Test54Blueprint\Plugins\CesiumForUnreal\Source\CesiumRuntime\Public\CesiumGlobeAnchorComponent.h(185): error C2143: syntax error: missing ';' before '*'
C:\Users\SomeUser\Documents\Unreal Projects\Test54Blueprint\Plugins\CesiumForUnreal\Source\CesiumRuntime\Public\CesiumGlobeAnchorComponent.h(185): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
...
csciguy8 commented 4 days ago

One solution could be to just make some of our CI builds "non-unity" builds, but this could would come at the cost of compile time and artifact size, which came up in this issue

csciguy8 commented 4 days ago

One possible solution is to use a IWYU (include what you use) tool to strip out unneeded headers, but also ensure that proper headers are included for every source file.