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

[CI] Cache tag is incorrect/useless, and should be fixed. #30

Open
kitlith opened this issue Sep 5, 2022 · 0 comments
Open

[CI] Cache tag is incorrect/useless, and should be fixed. #30

kitlith opened this issue Sep 5, 2022 · 0 comments
Labels
Priority: Normal The default priority Type: Bug Something isn't working

Comments

@kitlith
Copy link
Member

kitlith commented Sep 5, 2022

not submitting a PR for this right now because there is only so much CI work I feel like doing at once.
CI currently specifies the following cache key for vcpkg:
${{ hashFiles( 'vcpkg_manifest/vcpkg.json' ) }}-${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}-${{ hashFiles( '${{ env.VCPKG_ROOT }}/.git/HEAD' )}}-${{ matrix.triplet }}-invalidate

for each variable used from left to right:

  • hashFiles( 'vcpkg_manifest/vcpkg.json' ): our vcpkg.json isn't located in a 'vcpkg_manifest' folder
  • hashFiles( '.git/modules/vcpkg/HEAD' ): we don't use vcpkg as a submodule
  • hashFiles( '${{ env.VCPKG_ROOT }}/.git/HEAD' ): i'm actually not sure why this isn't working, might also be because we don't use vcpkg as a submodule
  • matrix.triplet: 👍

All in all this results in us generating a cache key of ---x64-windows-static-md-invalidate as of the current latest commit. Given that cache entries are immutable, we're not actually tracking most of the variables that should be invalidating the cache. whoops.

How to fix

  1. An easy mitigation is to point to the correct vcpkg.json. That way, it'll update when we add new libraries, and we can always bump something in vcpkg.json if we notice that cache is stale.
  2. We can use a github action like lukka/run-vcpkg to handle the vcpkg cache for us, so that we don't have to embed the requirements into our CI script. One less thing to worry about.
  3. We can use vcpkg as a submodule, as I do in the feeder app. Unfortunately I can't find the documentation that led me to believe that this was a good idea at the moment.
  • This would also result in users not having to explicitly setup vcpkg on their machines, just run cmake and the rest is more or less handled.
  • Currently we only use vcpkg for a single dependency, but we could move our other dependencies into vcpkg, or maybe we could decide on a different way to depend on protobuf.
@TheButlah TheButlah added the Status: Unlabeled A maintainer has not yet labeled this label Oct 5, 2022
@ButterscotchV ButterscotchV added Type: Bug Something isn't working Priority: Normal The default priority and removed Status: Unlabeled A maintainer has not yet labeled this labels May 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal The default priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants