Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve and fix vcpkg caching #1493

Merged
merged 6 commits into from
Jan 10, 2025
Merged

Improve and fix vcpkg caching #1493

merged 6 commits into from
Jan 10, 2025

Conversation

DanRStevens
Copy link
Member

Split vcpkg install of dependencies into it's own step. This separates the timing for the vcpkg step from the build step.

Fix copying of vcpkg_installed folders from OPHD to NAS2D.

Turns out there isn't a serious doubling of time for vcpkg initialization when it's split out like this. Rather, there was a doubling of timing because there were two separate vcpkg_installed folders, one for OPHD and one for NAS2D. By copying from one to the other we can reduce initialization time.

There is still a bit of a slowdown when building NAS2D, even when no changes need to be compiled. I'm currently uncertain of the source of this.


Work for:

Contains a fix for:

The previous copy command was copying the contents of the first folder into the second folder. That effectively stripped off the root folder name from the source, losing one level of folders. That of course made the copy rather useless, which meant no time was saved when trying to build the NAS2D project.
Hopefully this separates out the setup time from the later build steps, without increasing overall build time in any significant way.
This should prevent the need to start from scratch after a failed build.
Since packages are cached in separate folders between NAS2D and OPHD, we should probably run-the pre-install step for both of them.
Since we are explicitly saving the cache after the NAS2D build, we should make the restore specifically a restore, and not a fully wrapped restore + save as a post step.
Makes more sense to group these together. Less that can go wrong in the middle and prevent the NAS2D build cache from being saved.
@DanRStevens DanRStevens merged commit fa4e6af into main Jan 10, 2025
7 checks passed
@DanRStevens DanRStevens deleted the updateVcpkgCaching branch January 10, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant