@@ -0,0 +1,42 @@
+name: FreeBSD
+
+on:
+ pull_request:
+ push:
+ release:
+ types: [published]
+jobs:
+ build:
+ strategy:
+ matrix:
+ os: [macOS-latest]
+ kind: [static, shared]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Inject slug/short variables
+ uses: rlespinasse/[email protected]
+ - name: Tests
+ uses: vmactions/[email protected]
+ usesh: true
+ prepare: pkg install -y git curl unzip gmake llvm gsed bash perl5
+ run: |
+ git clone --recurse-submodules https://github.com/xmake-io/xmake.git /tmp/xmake -b dev
+ cd /tmp/xmake
+ gmake -j4
+ gmake install
+ export XMAKE_ROOT=y
+ git clone https://github.com/xmake-io/xmake-repo.git /tmp/xmake-repo -b ${{ env.GITHUB_REF_SLUG }} --depth 2
+ cd /tmp/xmake-repo
+ xmake l ./scripts/test.lua -D -k ${{ matrix.kind }}
@@ -13,7 +13,7 @@ package("giflib")
add_deps("cgetopt")
end
- on_install("linux", "macosx", "windows", "mingw", "android", "iphoneos", function (package)
+ on_install("linux", "macosx", "windows", "mingw", "android", "iphoneos", "bsd", function (package)
local lib_sources = {"dgif_lib.c", "egif_lib.c", "gifalloc.c", "gif_err.c", "gif_font.c", "gif_hash.c", "openbsd-reallocarray.c"}
local kind = "static"
if package:config("shared") then
@@ -23,7 +23,7 @@ package("libtiff")
import("package.tools.cmake").install(package, configs)
end)
- on_install("macosx", "linux", function (package)
+ on_install("macosx", "linux", "bsd", function (package)
local configs = {"--disable-dependency-tracking", "--disable-lzma", "--disable-webp", "--disable-jpeg", "--disable-zstd", "--disable-old-jpeg", "--disable-jbig", "--disable-pixarlog", "--without-x"}
table.insert(configs, "--enable-shared=yes")
@@ -23,7 +23,7 @@ package("libwebp")
add_syslinks("pthread")
- on_install("linux", "macosx", "windows", "mingw", function (package)
+ on_install("linux", "macosx", "windows", "mingw", "bsd", function (package)
local configs = {}
table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
@@ -23,7 +23,7 @@ package("zlib")
os.cp("*.h", package:installdir("include"))
- on_install("macosx", function (package)
+ on_install("macosx", "bsd", function (package)
import("package.tools.autoconf").install(package, {"--static"})
@@ -146,6 +146,11 @@ function main(...)
return
+ -- we only test one package because freebsd ci is too slow
+ if is_host("bsd") then
+ packages = {packages[1]}
+ end
-- prepare test project
local repodir = os.curdir()
local workdir = path.join(os.tmpdir(), "xmake-repo")