teascript: add package (#3768)

* teascript: add package

* teascript: add configs

* teascript: set headeronly

* teascript: limit to windows, linux, macosx

* teascript: change limits

* teascript: change limits

* teascript: fix limit

* teascript: change limits

* teascript: change limits

* teascript: change limits

* teascript: combine limits

* teascript: fix limits

* teascript: enable macosx

* teascript: separate macosx

* teascript: change limit for macosx

* teascript: comment out

* teascript: fix ignore iphone

* teascript: ignore macosx x86_64

* teascript: make shorter ignore

* teascript: allow mingw

* teascript: ignore some mingw

* teascript: simpler limits

* teascript: allow mingw

* teascript: fix limit on mingw

* teascript: fix mingw

* teascript: ignore type of mingw

* teascript: allow mingw

* teascript: fix mingw

* Update mingw_macos.yml

* Update mingw_macos.yml

---------

Co-authored-by: ruki <waruqi@gmail.com>
pull/3793/head
Chi Huu Huynh 7 months ago committed by GitHub
parent 4d46a5f5ce
commit 4caa3235d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      .github/workflows/mingw_macos.yml
  2. 36
      packages/t/teascript/xmake.lua

@ -11,11 +11,12 @@ jobs:
matrix:
os: [macOS-latest]
kind: [static, shared]
arch: [i386, x86_64]
runs-on: ${{ matrix.os }}
concurrency:
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-MingW-macOS-${{ matrix.kind }}
group: ${{ github.ref }}-${{ github.base_ref }}-${{ github.head_ref }}-MingW-macOS-${{ matrix.kind }}-${{ matrix.arch }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v1
@ -30,5 +31,5 @@ jobs:
- name: Tests
run: |
xmake l ./scripts/test.lua -D -p mingw -k ${{ matrix.kind }}
xmake l ./scripts/test.lua -D -p mingw -a ${{ matrix.arch }} -k ${{ matrix.kind }}

@ -0,0 +1,36 @@
package("teascript")
set_kind("library", {headeronly = true})
set_homepage("https://tea-age.solutions/teascript/overview-and-highlights/")
set_description("TeaScript C++ Library - embedded scripting language for C++ Applications")
set_license("MPL-2.0")
add_urls("https://github.com/Florian-Thake/TeaScript-Cpp-Library/archive/refs/tags/$(version).tar.gz",
"https://github.com/Florian-Thake/TeaScript-Cpp-Library.git")
add_versions("v0.13.0", "7c8cc05a8775ee2c857278b5e353670bf02442b2fa3a411343e82b2b85eedced")
add_configs("fmt", {description = "Use fmt for printing.", default = true, type = "boolean"})
add_configs("toml++", {description = "Enable toml support.", default = true, type = "boolean"})
on_load(function (package)
if package:config("fmt") then
package:add("deps", "fmt")
end
if package:config("toml++") then
package:add("deps", "toml++")
end
end)
on_install("windows", "linux", "macosx|arm64", "bsd", "msys", "mingw|i386", function (package)
os.cp("include", package:installdir())
end)
on_test(function (package)
assert(package:check_cxxsnippets({test = [[
#include "teascript/Engine.hpp"
void test() {
teascript::Engine engine;
engine.ExecuteCode("println(\"Hello, World!\");");
}
]]}, {configs = {languages = "c++20"}}))
end)
Loading…
Cancel
Save