local compat_versions = { ["scm-1"] = "master", ["0.14.3-1"] = "v0.14.3", ["0.14.2-1"] = "v0.14.2", ["0.14.1-1"] = "v0.14.1", } -- Version 1 doesn't build for lua 54, and versions 9 and 10 dont have rockspecs. for i = 2,14 do if i ~= 9 and i ~= 10 then compat_versions["0." .. i .. "-1"] = "v0." .. i end end local lua_versions = { ["51"] = true, ["52"] = true, ["53"] = true, ["54"] = true, } local optimizations = { tiny = "-Oz", size = "-Os", zero = "-O0", one = "-O1", two = "-O2", three = "-O3", debug = "-Og" } local debug = { release = "", debug = "-g", } local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} local builds = {} for version, _, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do for package_version,branch in pairs(compat_versions) do local buildname = "lua-compat-53-" .. package_version:gsub("[%W]","-") .. "-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image builds[buildname] = { image = "image-luarocks-" .. version.. "-" .. image, requires = { {"git", "lua-compat-5.3#" .. branch}, {"cicd","image-luarocks-" .. version .. "-" .. image}, {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, }, produces = { ["compat53-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "compat53", image, version, name, rel}, }, env = { CFLAGS = optimization .. " " .. flag, packver = package_version, rockver = version:gsub("(%d)(%d)$","%1.%2"), version = version }, } end local buildname2 = "lua-bit32-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image builds[buildname2] = { image = "image-luarocks-" .. version .. "-" .. image, entrypoint="bit32", requires = { {"git", "lua-compat-5.3"}, {"cicd","image-luarocks-" .. version .. "-" .. image}, {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, }, produces = { ["bit32-scm-1.mingw32-x86_64.rock"] = {"luarocks.sh", "bit32", image, version, name, rel}, }, env = { CFLAGS = optimization .. " " .. flag, rockver = version:gsub("(%d)(%d)$","%1.%2"), version = version }, } --[[ builds[buildname .. "-test"] = { image = "image-wine", requires = { {"cicd", buildname .. ":luafilesystem-scm-1.mingw32-x86_64.rock"}, {"cicd", "lua-" .. version .. "-" .. optimization .. "-" .. rel .. "-" .. } } } ]] end return builds