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

Platform-specific cache keys #161

Open
krlmlr opened this issue Sep 7, 2023 · 2 comments
Open

Platform-specific cache keys #161

krlmlr opened this issue Sep 7, 2023 · 2 comments

Comments

@krlmlr
Copy link
Contributor

krlmlr commented Sep 7, 2023

I run a build matrix across macOS, Linux (Ubuntu 20.04 and 22.04) and Windows. It seems to make no sense to reuse the same cache across platforms, and I suspect a race condition when those platforms are actually built and cached in parallel.

Should the platform be part of the cache key by default? I'm currently working around: https://github.com/krlmlr/duckdb-r/blob/ccache/.github/workflows/install/action.yml#L87-L97

@hendrikmuhs
Copy link
Owner

I am not sure if this is a workaround or best practice, I use

${{ matrix.os }}-${{ matrix.type }}

for my builds.

@juan-lunarg
Copy link

juan-lunarg commented Nov 15, 2023

What about when you have a complicated matrix for testing?

We have a pretty involved matrix right now:

- uses: hendrikmuhs/ccache-action@v1.2
    with:
      key: ${{ matrix.config }}-${{ matrix.compiler }}-${{ matrix.os }}-${{ matrix.santizer }}-${{ matrix.etc }}

If someone makes a change to the matrix it's easy to forget to update the key.

Is there a better way to write this? IE an automated way to get a hash of the matrix that I could use for the key? Or auto detect the platform / matrix if possible?

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

No branches or pull requests

3 participants