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 local buildname = "lpeg-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image builds[buildname] = { image = "image-luarocks-" .. version.. "-" .. image, requires = { {"git", "lpeg"}, {"cicd","image-luarocks-" .. version .. "-" .. image}, {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"}, }, produces = { ["lpeg-1.1.0-2.mingw32-x86_64.rock"] = {"luarocks.sh", "lpeg", image, version, name, rel}, }, env = { CFLAGS = optimization .. " " .. flag, rockver = version:gsub("(%d)(%d)$","%1.%2"), version = version }, } end return builds