hendrikmuhs / ccache-action

github action to speedup building using ccache
MIT License
122 stars 54 forks source link

Add sccache to PATH after installation #204

Closed kendalharland closed 5 months ago

kendalharland commented 5 months ago

This action installs sccache under $USERPROFILE/.cargo/bin. GitHub runner images already have $USERPROFILE/.cargo/bin in the PATH, but self-hosted runners may not. This PR makes this action update the user's PATH to include the installation directory. This allows self-hosted runners to find sccache and prevents breakages in the unlikely event that a different installation directory is chosen in the future.

Note: I recently closed a duplicate PR with the intention of merging from a different fork but it is easier to merge from kendalharland:main

kendalharland commented 5 months ago

Hi @hendrikmuhs, friendly reminder to PTAL when you can.

hendrikmuhs commented 5 months ago

Thanks @kendalharland !

I can not really judge as I am not using this functionality. I wonder if changing the PATH in this action helps finding the binary in following actions in a github workflow. Normally that's not the case. But I guess you have tested it and can confirm?

compnerd commented 5 months ago

@hendrikmuhs yes, that is the case - it helps find the executable. This would only apply for the job in which the extension is used as each job itself resets the environment.

kendalharland commented 5 months ago

Thank you!