summaryrefslogtreecommitdiff
path: root/meta.lua
blob: 614213cd6d5fb86ccfce071e902fef2eefe96c0e (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
local optimizations = {
	tiny = "-Oz",
	size = "-Os",
	debug = "-Og",
	zero = "-O0",
	one = "-O1",
	two = "-O2",
	three = "-O3",
}
local debug = {
	release = "",
	debug = "-g",
}
local lua_versions = {
	["51"] = true,
	["52"] = true,
	["53"] = true,
	["54"] = true,
}
local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]}
local builds = {}

for name, optimization, rel, flag, _, image, lua_version, _ in cartesian(optimizations, debug, compilers, lua_versions) do
	local name = "yuescript-" .. lua_version .. "-" .. name .. "-" .. rel .. "-" .. image
	builds[name] = {
		image = "image-luarocks-" .. lua_version .. "-" .. image,
		requires = {
			{"git","yuescript#main"},
			{"cicd", "image-" .. image},
		},
		produces = {
			["yue.so"] = true,
		},
		env = {
			CFLAGS = optimization .. " " .. flag,
		},
		timeout=300,
	}
	break
end
return builds