1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-24 10:30:53 +00:00
Commit graph

37190 commits

Author SHA1 Message Date
AnyOldName3
9bb5ef06ec Cache size can be smaller now there aren't several huge PCHs that need to be included
Sizes verified with https://gitlab.com/AnyOldName3/openmw/-/pipelines/2268240021

Ignore the build failures - Ananace's S3 storage was temporarily down.
2026-01-17 02:35:41 +00:00
AnyOldName3
ddf715f148 Accidental double space 2026-01-17 00:50:27 +00:00
AnyOldName3
3cf755266f Prefer add_compile_definitions
add_definitions is really add_any_compiler_flag_you_want
2026-01-17 00:50:12 +00:00
AnyOldName3
4ea6374a9e Ensure Win32 character set definitions are consistent
Qt 6 made it so anything that linked with it had the defines that put the Win32 API into UTF-16 mode.

That means that components (which we reuse the PCH for in multiple targets now) had incompatible defines, and the PCHs wouldn't work.

Before CMP0204, CMake wouldn't set these defines at all except with the Visual Studio generators, so this wasn't causing any problems that caused a compile error when I tested a Ninja-based build.
2026-01-17 00:46:54 +00:00
AnyOldName3
24d07da29c Rejig components defines
OPENMW_DOC_BASEURL is only used in a CMake-configured file, so it only needs to be a CMake variable, which it already is.
There's no benefit to making it visible to every TU in components.

MYGUI_DONT_USE_OBSOLETE should be visible in everything that transitively includes MyGUI just in case.
This should really be set up by MyGUI's CMake config or embedded in a generated MyGUI header rather than being our responsibility, but while we're forced to deal with it, it's closer to right to make it a PUBLIC define on components rather than a directory-scoped define in the components directory.
2026-01-15 18:35:12 +00:00
AnyOldName3
e68d4317c4 Get rid of unique PCHs from targets with three or fewer translation units
Precompiled headers avoid duplicate work.
If you've only got a single TU using a particular PCH, then there's no duplicate work, so it can only add overhead.

We don't need to totally abandon PCHs for these targets, though, as CMake lets us reuse the PCH from components.

If you've only got a few TUs in a target, it's *probably* faster to get components' PCH for free and eat the cost of it not being perfect than it is to make a perfect PCH from scratch.

Note that I don't know if there are drawbacks due to components having a couple of private precompiled headers that wouldn't have otherwise propagated or these targets having different build flags.
I can't test it locally right now as my linker's regained the deadlocking issue it had the other day.
If it turns out there are problems, then for the single-TU targets, simply avoiding using PCHs for them at all will still be an improvement over the status quo.
For the two-or-three TU targets, we'll have to actually measure things.
2026-01-15 17:44:32 +00:00
AnyOldName3
8843ce2ec7 Keep CMakeCache.txt as an artefact
This might help diagnose some build problems in the future.

In fact, I need one for MacOS right now, and need to run a job on the upstream CI with this change to get one, so hijacking my existing CI MR seems like a great solution.
2026-01-12 15:19:17 +00:00
AnyOldName3
1d24a49dc1 Keep .ninja_log
It has per-node timings
2026-01-07 02:14:35 +00:00
AnyOldName3
5bbb0a5ea6 Unique binlog name per MSBuild invocation 2026-01-07 00:17:52 +00:00
AnyOldName3
bd653256a7 Correct licence path 2026-01-07 00:16:35 +00:00
AnyOldName3
f5b5a03a4d Add license to dev builds
We don't build the installer, so the step that installs the licence gets skipped.

We're legally required to make it clear what the licence is.
2026-01-06 23:06:39 +00:00
AnyOldName3
1ff20e52f7 Also run Ninja jobs if the CI script changes
It might affect the definition of the things it defines, which includes the Ninja jobs.
2026-01-06 01:24:49 +00:00
AnyOldName3
9267b8ecc8 Set cache size based on successful build
For some reason, the Group Two cache is a little bigger than for Ninja, despite having the same number of calls logged.
2026-01-06 01:22:57 +00:00
AnyOldName3
863077986d after_script is run from a fresh shell
We can't use the environment variable we set earlier.
2026-01-05 23:27:19 +00:00
AnyOldName3
de6fba9168 Empty commit 2026-01-05 20:13:17 +00:00
AnyOldName3
660347069e Too many colons 2026-01-05 17:37:01 +00:00
AnyOldName3
c7670ddf5d Move ccache out of TrackFileAccess' juristiction 2026-01-05 16:40:23 +00:00
AnyOldName3
0214e70333 Save binary log for MSBuild
this should let us inspect things in more detail, and hopefully explain why things are being rebuilt.
2026-01-04 18:37:38 +00:00
AnyOldName3
dd11db2228 Give up, use CMD's rd
The prune command fails due to the error mentioned in the previous commit message.

Using PowerShell's Remove-Item is slow due to needing to create a .NET representation for each file before processing it.

Using [System.IO.Directory]::Delete throws an exception and gives up if any file can't be deleted.
Even though docker seems to be thoroughly killed, we don't have access to delete some of its files most of the time, which might be related to the original error that blocks the prune command.

CMD's rd should be as fast as anything else (except for the smallish overhead from creating a subprocess), and at least for Aussiemon, it seems to work.
2026-01-04 18:35:14 +00:00
AnyOldName3
530ee75857 Stop docker before stealing its files 2026-01-04 18:35:03 +00:00
AnyOldName3
c1087c7a13 Use more reliable Docker deleter
This should avoid this error:
error during connect: In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.: Post "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/prune": open //./pipe/docker_engine: The system cannot find the file specified.

We've mentioned that to GitLab here: https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/-/issues/63#note_2982154702
2026-01-04 18:34:50 +00:00
AnyOldName3
a208125906 Re-enable TrackFileAccess
Incremental builds don't work at all without it, which means every TU needs recompiling for every project.

This will break cleaning unless ccache data is within %APPDATA% or %TEMP%.
2026-01-03 16:31:39 +00:00
AnyOldName3
f17c8a23da Actually read variable
this path isn't taken, so didn't kill CI, but is intended to work if someone uses it.
2026-01-02 23:34:02 +00:00
AnyOldName3
d4da848f4b Don't set /MP when using ccache
This *should* make no difference as we already do things that mean ccache only gets told about one TU at once (e.g. using Ninja, or enabling UseMultiToolTask), but at the minimum, it's misleading to have this enabled when we know we're not using it.
2026-01-02 19:02:42 +00:00
AnyOldName3
fc4e288742 don't prompt for confirmation 2026-01-02 04:16:25 +00:00
AnyOldName3
f11b2a3d7d See how much space an aggressive Docker prune gets us
Hopefully it's lots.
2026-01-02 02:17:45 +00:00
AnyOldName3
fef5f60828 Set ccache size limits per group
A successful run for the Ninja jobs showed that 1G and 2G were fine for groups one and two.

I'm leaving some leeway for the MSBuild jobs as they've not succeeded yet and there might be some kind of madness that means they need more.
We won't be able to see until at least one build gets far enough.
2026-01-02 02:14:09 +00:00
AnyOldName3
580a10ef73 Add PCH sloppiness for Ninja build 2026-01-01 23:22:26 +00:00
AnyOldName3
777ac2aaa6 Make MSBuild the default again
The ccache branches only made Ninja the default when ccache couldn't work with MSBuild.
2026-01-01 19:07:08 +00:00
AnyOldName3
3e016709b4 Adapt to split jobs 2026-01-01 18:59:56 +00:00
AnyOldName3
618d221f37 CMAKE_AUTOGEN_PARALLEL=1 2026-01-01 18:45:53 +00:00
AnyOldName3
240e2486ed CCache with MSBuild 2026-01-01 18:45:53 +00:00
AnyOldName3
39ec9f32a1 Don't use CCACHE_BASEDIR with MSVC
The build directory path is consistent within a fork anyway, and we can't share cache outside that scope.
2026-01-01 18:44:34 +00:00
AnyOldName3
fb6ad44ca8 Extra anti-WSL protection
On a machine with Windows Subsystem for Linux installed, the first bash in the path will typically be the WSL launcher that gives Linux bash.

We must therefore ensure we recursively call into the MSYS2 shell we're already using.
2026-01-01 18:44:34 +00:00
AnyOldName3
dda54c1154 Precompiled headers are fine with ccache in 2025 2026-01-01 18:44:33 +00:00
AnyOldName3
f7c015d5dd One value per varibles key 2026-01-01 18:44:33 +00:00
AnyOldName3
d65e76e855 Try quoting 2026-01-01 18:43:37 +00:00
AnyOldName3
51c30cd4e3 Try inode cache now ccache 4.10 is out 2026-01-01 18:43:37 +00:00
AnyOldName3
c8b52581e3 Try ignoring dependency headers 2026-01-01 18:43:37 +00:00
AnyOldName3
39c69dfbcd Try disabling preprocessed cache lookup 2026-01-01 18:43:37 +00:00
AnyOldName3
d094de5fc5 Quote string
YAML doesn't like the double colon
2026-01-01 18:43:37 +00:00
AnyOldName3
a1e5cec437 Print time and percentage for Ninja builds 2026-01-01 18:42:54 +00:00
AnyOldName3
4ffe94d3ec Reset CCache stats, set cache size 2026-01-01 18:41:56 +00:00
AnyOldName3
3f49e8db8a And the dot 2026-01-01 18:41:56 +00:00
AnyOldName3
f8496e4f67 Re-enable MSBuild job when things might have killed it 2026-01-01 18:41:55 +00:00
AnyOldName3
795bb0bb98 Switch from MSBuild to Ninja for default Windows job
It should be way faster now CCache is working
2026-01-01 18:41:55 +00:00
AnyOldName3
3c66c2cbd3 Continue running master and release branch pipelines when we do back-to-back merges 2026-01-01 18:41:55 +00:00
Alexei Kotov
a207b45101 Merge branch 'splitting-headache' into 'master'
Split the Windows build into two, like it was when the time limit was an hour before mid 2022

See merge request OpenMW/openmw!5070
2026-01-01 18:43:16 +03:00
Alexei Kotov
9efef817dc Merge branch 'navmeshtool_worldspaces' into 'master'
Somewhat reduce navmeshtool peak memory usage

See merge request OpenMW/openmw!5076
2025-12-31 00:37:51 +03:00
AnyOldName3
25543090af Get rid of TODO that doesn't need doing 2025-12-30 17:44:44 +00:00