This is a backport of the following commits from master:
934aa20d69 Build and run tests on Circle CI too
9f1bf3982d Install RPM required for Shift-JIS support in Fedora
64aefb5f4e Install locales used by the tests under Fedora
84120664ca Make Circe CI script more consistent with Cirrus CI
bf3951866c Install Git before checking out the sources
3eb78a328e Use ccache in Circle CI job
e63fe497ab Install more optional libraries under Fedora
a527b2714d Allow installing extra packages in before_install.sh
b430a6104c Add a minimal Fedora build using Circle CI
382db6439b Install required packages on RedHat-like systems