NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
486 stars 186 forks source link

Properly set up CCACHE + fix doxygen config for versions up to 1.10.0 #5078

Closed jmarrec closed 6 months ago

jmarrec commented 6 months ago

Pull request overview

This should work on windows. Haven't had time to confirm, but I did enable it successfully on OpenStudioApplication with the same change.

(One of) the old issue was that MSVC would fail to build RC files when ccache was picked up, and this won't.

RULE_LAUNCH_COMPILE is now flagged as an internal implementation detail, and it makes the compile of the RC file fail on windows.

For incremental rebuilds on the OSApp using github actions, for something that had very little change (or no change, only a workflow change for eg), I took the run time from 1h15 to about 15min (the build time itself went from 50 to 3min). So I'd say it's definitely worth trying to implement ccache on windows for Jenkins.

It's possible this won't work as is due to C# or something like this. Regardless, this is the correct way of enabling ccache on Unix as well, so this should be merged anyways

See the note on https://cmake.org/cmake/help/latest/prop_gbl/RULE_LAUNCH_COMPILE.html

Note This property is intended for internal use by ctest(1). Projects and developers should use the _COMPILERLAUNCHER target properties or the associated CMAKE_COMPILER_LAUNCHER variables instead.

Pull Request Author

Labels:

Review Checklist

This will not be exhaustively relevant to every PR.

jmarrec commented 6 months ago

The windows incremental runner was broken to due having doxygen 1.8.15 and us strongly requiring >=1.8.8,<1.8.9, so just fix the config to make it work.

I have tested doxygen 1.10.0 locally and the search feature works now.

ci-commercialbuildings commented 6 months ago

CI Results for 72adf6f54693f4be118111b424bc8d37e4d61110:

jmarrec commented 6 months ago

Testing a full build on windows with ccache enabled by using this branch and a modified jenkins lib for the openstudio full build develop windows runner.

I can build properly with ccache enabled (though I kept running in the mt.exe manifest issue... we need to disable antivirus/windows defender scanning for the build dir): see https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-full/detail/openstudio-develop-full/571/pipeline

Replaying a run that wipes the build dir and rebuilds, while the cache is hot (and no code changes) at https://ci.openstudio.net/blue/organizations/jenkins/openstudio-develop-full/detail/openstudio-develop-full/573/pipeline

Build took about 10min (cmake configure itself takes 9min!! That is horrendous). The same Build would take approx 2h15 without ccache (it's been So long since we had a windows full build working on the first try that I found one from last may)