CI: speed up the NanoVDB Windows job - #2289
Conversation
The windows-nanovdb job spent ~37 of its ~52 minutes installing dependencies from scratch on every run: - Enable vcpkg's GitHub Actions binary caching (x-gha) so dependency builds are reused across runs instead of compiled from source (~24 min -> ~1-2 min on a cache hit). - Cache the CUDA toolkit directory and skip the NVIDIA network installer on a hit, restoring the environment variables and the Visual Studio build customizations the installer would have set up (~13 min -> ~1 min). - Only install the vcpkg packages this job's components need, dropping openexr, cppunit, glfw3, glew, jemalloc and libpng. Without jemalloc the build falls back to tbbmalloc via CONCURRENT_MALLOC=Auto. ci/install_windows.ps1 gains an optional -Packages parameter that defaults to the existing full list, so build.yml and weekly.yml are unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
It is the recommended allocator for OpenVDB, so keep CI building against it rather than falling back to tbbmalloc. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Jonathan Swartz <jonathan@jswartz.info>
harrism
left a comment
There was a problem hiding this comment.
This is awesome. The Windows CI is slow. I think windows runners tend to be more expensive than Linux as well, so a good savings.
|
Hi @swahtz, I just wanted to mention that we use GHA caches in a slightly unusual way on this project. We have a CI job that runs once a week and caches the latest Houdini production installation and then this gets re-used on each per-commit CI run. Then the following week it runs again and potentially picks up a later installation. If these caches get eliminated, the weekly CI needs to be run by hand to re-populate them so the per-commit CI can succeed. This is also done as an airgap to prevent the API access keys leaking into PRs submitted against the repo. The caches are prefixed "vdb-v5-houdini*" under https://github.com/AcademySoftwareFoundation/openvdb/actions/caches. We also currently use GHA caches for ccache. GHA cache space has a limit of 10GB (although I understand it is also an option to pay to extend this) and they get evicted based on most-recently used logic. Our Houdini caches typically fall well within that 10GB limit, so I expect your new caching will be fine. I wouldn't object to rolling this out and then discussing what to do if we start routinely eliminating the Houdini caches in practice, just letting you know about this extra consideration. How much data do you expect this to be and if it's not a lot, could we potentially share data between these jobs and the other Windows CI such as build and weekly? |
The windows-nanovdb job spends ~37 of its ~52 minutes installing dependencies from scratch on every run (e.g. this run: install_cuda 13 min, vcpkg install 24 min). This PR:
x-gha) so dependency builds are reused across runs instead of compiled from source (~24 min → ~1-2 min on a cache hit). Agithub-scriptstep exports the Actions cache URL/token, which are only visible to JavaScript actions.ci/install_windows.ps1gains an optional-Packagesparameter that defaults to the existing full list, sobuild.ymlandweekly.ymlare unaffected.Notes:
🤖 Generated with Claude Code