From c913875bc40bcbd4d5382cf6de01ac6101bbaf33 Mon Sep 17 00:00:00 2001 From: Alexander M Pickering Date: Tue, 17 Sep 2024 12:51:05 -0500 Subject: Work on packaging --- init | 13 +++++++++++++ meta.lua | 51 ++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 59 insertions(+), 5 deletions(-) diff --git a/init b/init index 642d265..cd3b57e 100755 --- a/init +++ b/init @@ -1 +1,14 @@ #!/bin/sh -ex + +if [ -e libluajit.a ]; then + mv libluajit.a liblua.a +fi +cd luarocks/binary +mkdir build-windows-deps-cicd +cd build-windows-deps-cicd +cp /root/liblua.a . +cp /root/libssl.a . +cp /root/libz.a . + +cd .. +make WINDOWS_DEPS_DIR=windows-deps-cicd diff --git a/meta.lua b/meta.lua index c0fcd5c..2ea6ee6 100644 --- a/meta.lua +++ b/meta.lua @@ -1,6 +1,47 @@ -return { - ["luarocks"] = { - requires = {}, - produces = {}, - } +local lua_versions = { + ["51"] = "liblua.a", + ["52"] = "liblua.a", + ["53"] = "liblua.a", + ["54"] = "liblua.a", + ["jit"] = "libluajit.a", +} +local optimizations = { + tiny = "-Oz", + --[[ + size = "-Os", + debug = "-Og", + zero = "-O0", + one = "-O1", + two = "-O2", + three = "-O3", + ]] } +local debug = { + --[[ + release = "", + ]] + debug = "-g", +} +local compilers = {--[["mingw32",]]"mingw64"--[[,"clang32","clang64"]]} + +local builds = {} +for version_k, version_v, opti_k, opti_v, debug_k, debug_v, comp_k, comp_v in cartesian(lua_versions, optimizations, debug, compilers) do + local name = "luarocks-" .. version_k .. "-" .. opti_k .. "-" .. debug_k .. "-" .. comp_v + builds[name] = { + image="image-" .. comp_v, + requires = { + {"git", "luarocks"}, + {"cicd", "libressl-" .. opti_k .. "-" .. debug_k .. "-" .. comp_v .. ":libssl.a"}, + {"cicd", "libz-" .. opti_k .. "-" .. debug_k .. "-" .. comp_v .. ":libz.a"}, + {"cicd", "lua" .. version_k .. "-" .. opti_k .. "-" .. debug_k .. "-" .. comp_v .. ":" .. version_v}, + }, + produces = { + ["luarocks.exe"] = true, + }, + env = { + CFLAGS=" " .. opti_v .. " " .. debug_v, + } + } + +end +return builds -- cgit v1.2.3-55-g6feb