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

python cache key should include python arch #36

Closed
jeremyd2019 opened this issue Jul 7, 2021 · 4 comments · Fixed by #46
Closed

python cache key should include python arch #36

jeremyd2019 opened this issue Jul 7, 2021 · 4 comments · Fixed by #46

Comments

@jeremyd2019
Copy link
Member

Currently the actions/cache action is

- uses: actions/cache@v2
with:
path: ~\AppData\Local\pip\Cache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-

If actions/runner#1185 were implemented, I would change this to ${{ runner.os }}-${{ runner.arch }}-pip-. I don't know that it's worth adding yet another startsWith(matrix.name, 'clangarm') for it though, because the self-hosted runner already still has the pip cache (and in fact the per-user python modules) between runs.

@lazka
Copy link
Member

lazka commented Jul 7, 2021

we could just add matrix.name

@jeremyd2019
Copy link
Member Author

true, but then all the runners on x64 couldn't share the cache.

@lazka
Copy link
Member

lazka commented Aug 20, 2021

I'm wondering, is there a problem with x64/aarch64 sharing the cache? The wheels should all contain their arch in the filename, and the slight duplication shouldn't hurt much..

@jeremyd2019
Copy link
Member Author

Doesn't hurt much, no, just downloads wheels it won't use, and then downloads the ones it does want.

jeremyd2019 added a commit to msys2-arm/msys2-autobuild that referenced this issue Nov 4, 2021
Use new runner.arch variable instead of checking job name to see if
we're on ARM64.  Add runner.arch to python cache key (fixes msys2#36).

Move output of drive information to a new Runner details step, and add
output of CPU name (from MINGW-packages workflow) to that.
@lazka lazka closed this as completed in #46 Nov 4, 2021
lazka pushed a commit that referenced this issue Nov 4, 2021
Use new runner.arch variable instead of checking job name to see if
we're on ARM64.  Add runner.arch to python cache key (fixes #36).

Move output of drive information to a new Runner details step, and add
output of CPU name (from MINGW-packages workflow) to that.
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 a pull request may close this issue.

2 participants