-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Should configure ccache before restore cache #17
Comments
One thing more, don't run |
I resolved it in 64fc5fd. |
Still have problem with env: @Chocobo1 my pr can fix this, but 64fc5fd can't. |
Strictly speaking it is invalid to use environment variables here. Use
I'm concerned that if the ccache config resides within the cache path and after cache restore it will overwritten the configuration. I don't consider it correct. |
I think this is the relevant documentation:
And as I mentioned, setup-ccache-action is processed by GitHub Actions not via a runner/shell. https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
Also it seems to me that github have already known this (downside) and decided to provide both context properties and runner env variables. |
Yes, but Example:
Github action does have some weirdness to it. |
I think the main problem is that the paths to save cache and restore cache have to be exactly the same in terms of characters. setup-ccache-action/src/post.ts Line 85 in 3c66724
setup-ccache-action/src/main.ts Line 146 in 3c66724
|
True and they still haven't address it yet... Not sure if you are still looking for a workaround but just in case, perhaps the following will work: # export variable
- run: echo "GITHUB_WORKSPACE=$GITHUB_WORKSPACE" >> $GITHUB_ENV
# use variable
- name: Set up ccache
uses: Chocobo1/setup-ccache-action@v1
with:
ccache_options: |
cache_dir=${{ env.GITHUB_WORKSPACE }}/.ccache |
Earlier you talked about the possibility of overwriting the config file when restoring cache, so set the option after restoring.So maybe we can set the option |
If set cache_dir to another place,it will make restore cache never success.
Example:
So I think it should configure ccache before restore cache.
The text was updated successfully, but these errors were encountered: