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.06k stars 492 forks source link

Add mirrors for downloading lua #1612

Open estebanfer opened 2 weeks ago

estebanfer commented 2 weeks 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