add freebsd ci (#250)

pull/251/head
ruki 4 years ago committed by GitHub
parent 0079b03ed3
commit 6c608f5f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 42
      .github/workflows/freebsd.yml
  2. 2
      packages/g/giflib/xmake.lua
  3. 2
      packages/l/libtiff/xmake.lua
  4. 2
      packages/l/libwebp/xmake.lua
  5. 2
      packages/z/zlib/xmake.lua
  6. 5
      scripts/test.lua

@ -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/github-slug-action@v3.x
- name: Tests
uses: vmactions/freebsd-vm@v0.1.0
with:
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"}
if package:config("shared") then
table.insert(configs, "--enable-shared=yes")

@ -23,7 +23,7 @@ package("libwebp")
add_syslinks("pthread")
end
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"))
end)
on_install("macosx", function (package)
on_install("macosx", "bsd", function (package)
import("package.tools.autoconf").install(package, {"--static"})
end)

@ -146,6 +146,11 @@ function main(...)
return
end
-- 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")

Loading…
Cancel
Save