Closed mvorisek closed 1 year ago
FWIW I just install ccache myself before using this action as a workaround for now: if ccache is already installed, it's not going to try installing it and so works even in non-Debian environments.
Thank you for your comment. The workaround is working, however the issue should be fixed officially.
however the issue should be fixed officially.
This is a small opensource side-project, the best way to approach this is a PR.
however the issue should be fixed officially.
This is a small opensource side-project, the best way to approach this is a PR.
I thought about doing it (which is why I actually searched for container-related issues and found this one), but then decided that it probably wasn't a good idea to try installing ccache under all platforms, there are just too many of them, so installing ccache before using the action if you don't use a supported one looks like a reasonable solution.
However the action could at least check if it's not running under a Debian system and give a clear error in this case instead of just failing trying to run apt-get. Would you like to have a PR doing this?
Debian/Ubuntu apt
and Alpine apk
package managers are very common, thus both should be supported out of the box.
It's not up to me to decide this, but supporting apt
is natural because this is what is used in GitHub Actions environment. Starting to support anything else opens the door to supporting all package managers (are you sure apk
is really more popular than dnf
or pacman
or ...) and so seems unwise.
The check sounds like a good idea. It is preferable to fail fast with a clear error message.
Regarding support for other os's: I agree that 100% coverage isn't possible, but I am also not against it. I happily merge a PR that adds support.
I'd suggest skipping package managers altogether and using pre-build binaries from releases https://github.com/ccache/ccache/releases and https://github.com/mozilla/sccache/releases where possible.
This way it would also enable selecting particular version of the package.
Please add support for Alpine, currently,
apt
is tried to be used to installccache
but Alpine needsccache
.CI repro: https://github.com/php/php-src/actions/runs/4083551771/jobs/7039218638#step:6:18
Example GH workflow: