Compiling local packages via Github Actions

For some reason or another in order to build a piece of software I need some libraries not commonly found in some package distributions. Things like libff and libsecp256k1 with some custom build options. Is installing to /lib or /usr/local/lib supported via Github Actions or is the standard way to edit the build process, install to $HOME/.local/lib, and set the library paths via the respective command line options?

The GitHub hosted runners are running with a passwordless sudo so you should be able to add files /lib or /usr/local/lib