ThePhD / sol2

Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance - is here, and it's great! Documentation:
http://sol2.rtfd.io/
MIT License
4.25k stars 520 forks source link

Add mirrors for downloading lua #1612

Open estebanfer opened 5 months ago

estebanfer commented 5 months ago

There were a few times the official lua download website was down, causing CI to fail. Adding a few mirrors by default in case the server is down should prevent those issues. There are a few mirrors that would work:

I suppose the same web archive approach could be applied to luajit and others

Adding more URLs to FetchContent_Declare makes it to use the next ones in case the first ones don't work, like

FetchContent_Declare(
    lua-vanilla
    URL ${LUA_VANILLA_DOWNLOAD_URL} ${LUA_VANILLA_DOWNLOAD_URL_MIRROR}
)

${LUA_VANILLA_DOWNLOAD_URL} will be tried first, if it fails, it will try ${LUA_VANILLA_DOWNLOAD_URL_MIRROR} after