diff options
| -rwxr-xr-x | init | 2 | ||||
| -rw-r--r-- | meta.lua | 60 | ||||
| -rw-r--r-- | prepare | 9 |
3 files changed, 65 insertions, 6 deletions
| @@ -1 +1 @@ | |||
| #!/bin/bash -ex | #!/bin/sh -ex | ||
| @@ -1,7 +1,57 @@ | |||
| 1 | return { | 1 | local lua_versions = { |
| 2 | { | 2 | ["51"] = "https://www.lua.org/ftp/lua-5.1.5.tar.gz", |
| 3 | name = "##NAME##", | 3 | --[[ |
| 4 | requires = {}, | 4 | ["52"] = "https://www.lua.org/ftp/lua-5.2.4.tar.gz", |
| 5 | ["53"] = "https://www.lua.org/ftp/lua-5.3.6.tar.gz", | ||
| 6 | ["54"] = "https://www.lua.org/ftp/lua-5.4.7.tar.gz", | ||
| 7 | ]] | ||
| 8 | } | ||
| 9 | local optimizations = { | ||
| 10 | --[[ | ||
| 11 | size = "-Os", | ||
| 12 | zero = "-O0", | ||
| 13 | one = "-O1", | ||
| 14 | two = "-O2", | ||
| 15 | ]] | ||
| 16 | three = "-O3", | ||
| 17 | } | ||
| 18 | local debug = { | ||
| 19 | --[[ | ||
| 20 | release = "", | ||
| 21 | ]] | ||
| 22 | debug = "-g", | ||
| 23 | } | ||
| 24 | local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} | ||
| 25 | |||
| 26 | local builds = {} | ||
| 27 | for _,image,lua_ver,link in cartesian(compilers,lua_versions) do | ||
| 28 | builds["image-luafilesystem-" .. image .. "-lua" .. lua_ver] = { | ||
| 29 | image = "image-luafilesystem" .. image .. "-lua" .. lua_ver, | ||
| 30 | requires = { | ||
| 31 | {"http",link} | ||
| 32 | }, | ||
| 5 | produces = {}, | 33 | produces = {}, |
| 34 | export = true, | ||
| 35 | entrypoint = "prepare", | ||
| 36 | env = { | ||
| 37 | rockver = lua_ver:gsub("(%d)(%d)$","%1.%2") | ||
| 38 | } | ||
| 6 | } | 39 | } |
| 7 | } | 40 | end |
| 41 | for version, link, name, optimization, rel, flag, _, image in cartesian(lua_versions, optimizations, debug, compilers) do | ||
| 42 | local name = "lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image | ||
| 43 | builds[name] = { | ||
| 44 | image = "image-luafilesystem-" .. image .. "-lua" .. lua_ver, | ||
| 45 | requires = { | ||
| 46 | {"git", "luafilesystem"}, | ||
| 47 | {"cicd","lua" .. version .. "-" .. name .. "-" .. rel .. "-" .. image}, | ||
| 48 | }, | ||
| 49 | produces = { | ||
| 50 | "luafilesystem-git-1.win32-" .. image .. ".rock" | ||
| 51 | }, | ||
| 52 | env = { | ||
| 53 | CFLAGS = optimization .. " " .. flag, | ||
| 54 | rockver = lua_ver:gsub("(%d)(%d)$","%1.%2") | ||
| 55 | }, | ||
| 56 | } | ||
| 57 | end | ||
| @@ -0,0 +1,9 @@ | |||
| 1 | #!/bin/sh -ex | ||
| 2 | |||
| 3 | apk add luarocks$rocks_ver | ||
| 4 | luaver=$(ls lua-*.tar.gz | grep -Eo "lua-.\\..") | ||
| 5 | mkdir "$luaver" | ||
| 6 | tar -xvzf lua-*.tar.gz --directory="$luaver" --strip-components=1 | ||
| 7 | rm "/root/$luaver/src/*.c" | ||
| 8 | luarocks-$rocks_ver config variables.LUA_INCDIR "/root/$luaver/src" | ||
| 9 | luarocks-$rocks_ver config variables.CFLAGS "$CFLAGS" | ||
