Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mirrors for downloading lua #1612

Open
estebanfer opened this issue Jun 20, 2024 · 0 comments
Open

Add mirrors for downloading lua #1612

estebanfer opened this issue Jun 20, 2024 · 0 comments

Comments

@estebanfer
Copy link

estebanfer commented Jun 20, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant