CI: caching, retry robustness, and shallow clones#12658
CI: caching, retry robustness, and shallow clones#12658Copilot wants to merge 3 commits intodevelopmentfrom
Conversation
Co-authored-by: Simn <634365+Simn@users.noreply.github.com>
|
Most of that makes sense to me. Hl.hx is a bit confusing but that was already the case before this change. I wonder why the caching strategies for hxcpp and HL are so different because they seem quite similar in nature. Edit: Ah, it thought about that for a bit:
|
|
@copilot I have compared the CI run-time between the first and second run on this PR: Most importantly, mac-test cpp is failing due to a problem with precompiled headers, which is why it shows up as 45s. This is something we have to address. The numbers also generally suggest that the C++ caching isn't effective. HL looks very good on Windows, although that initial number actually seems a bit too high so maybe it was a flaky run. Please confirm that the numbers are accurate and draw your own conclusions regarding how to proceed. |
Co-authored-by: Simn <634365+Simn@users.noreply.github.com>
... The mac-test cpp failure is confirmed as a PCH mtime mismatch: hxcpp is freshly checked out each run (new mtimes), but the cached The hxcpp compile cache also didn't improve Linux cpp times (essentially identical between runs), so I've removed all three hxcpp cache steps in 55fe57b. The The other caches (hashlink, Lua) are working well - the comparison data confirms the Lua improvements (~50% reduction) and HL Windows went from ~13m to ~7m. |
|
I'm not sure how much this actually does, HL windows time seems very random so using it as a measure is not a good idea. The Lua change looks good on Linux, but I don't like the duplication in the workflow file that is happening here, so this would require some cleanup. |
Several CI jobs spend significant time rebuilding identical artifacts on every run, and transient network failures occasionally cause spurious build failures.
Robustness
--retry 3 --retry-delay 5 --failtocurl— prevents the "Unrecognized archive format" failure seen when the server returns a non-archive response transientlyCaching
New
actions/cachesteps added tolinux-test,mac-test, andwindows64-test(Lua cache already existed on Windows):Lua.hxcontent hashThe hxcpp compile cache is intentionally not persisted across runs: restoring cached precompiled headers (
.pch) fails when hxcpp is freshly checked out with new file mtimes, causing clang errors. TheHXCPP_COMPILE_CACHEenv var is retained for within-run caching across the multiple compilation steps in each test job.Hashlink cache correctness (
Hl.hx)getHlDependencies()previously early-returned when the binary already existed, skippingaddToPATH,addToLIBPATH,haxelibDev, andSys.putEnv. With a cached binary these steps are now always executed; only the cmake build is gated on the binary being absent.Shallow clones
Hl.hx: hashlink cloned with--depth=1Macro.hxparty():tink_coreandhxcorocloned with--depth=1💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.