sol2
sol2 copied to clipboard
Add mirrors for downloading lua
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:
-
https://web.archive.org/web/202if_/https://www.lua.org/ftp/lua-${LUA_VANILLA_VERSION}.tar.gz
(202
means latest available archived site in year 202X,if_
makes it to return the exact same content the site returned, not including web archive added stuff) -
https://www.tecgraf.puc-rio.br/lua/mirror/ftp/lua-${LUA_VANILLA_VERSION}.tar.gz
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