summaryrefslogtreecommitdiff
path: root/meta.lua
blob: 497d70b0d7478fa8ec6930ba0aa5640c6a12fff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local lua_versions = {
	["51"] = true,
	["52"] = true,
	["53"] = true,
	["54"] = true,
}
local package_versions = {
	["0.4.4-1"] = true,
	["scm-0"] = 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, _ in pairs(package_versions) do
		local buildname = "luasystem-" .. package_version:gsub("[%W]","-") .. "-" .. version .. "-" .. name .. "-" .. rel .. "-" .. image
		builds[buildname] = {
			image = "image-luarocks-" .. version.. "-" .. image,
			requires = {
				{"git", "luasystem"},
				{"cicd","image-luarocks-" .. version .. "-" .. image},
				{"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image .. ":lua" .. version .. ".dll"},
			},
			produces = {
				["luasystem-" .. package_version .. ".mingw32-x86_64.rock"] = {"luarocks.sh", "luasystem", image, version, name, rel},
			},
			env = {
				CFLAGS = optimization .. " " .. flag,
				rockver = version:gsub("(%d)(%d)$","%1.%2"),
				version = version,
				packver = package_version,
			},
		}
	end
end

return builds