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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
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
|