An other option would be to use ccache to speed up the actual build. We could use this GH action or use something like ./configure CC="ccache gcc" and cache CCACHE_DIR ourselves (see https://ccache.dev/manual/4.9.1.html)
Currently, the CI build is caching some of the build artifacts in the working directory among build stages using https://github.com/actions/cache/ -- Its there quite from the beginning and it is certainly not the most effective. The ccache can do something very similar with much more organized manner.
Originally posted by @frankmorgner in https://github.com/OpenSC/OpenSC/issues/3096#issuecomment-2040253341
Currently, the CI build is caching some of the build artifacts in the working directory among build stages using https://github.com/actions/cache/ -- Its there quite from the beginning and it is certainly not the most effective. The ccache can do something very similar with much more organized manner.