Parcourir la source

improve freebsd and libwebp

ruki il y a 4 ans
Parent
commit
3f77f74716
3 fichiers modifiés avec 38 ajouts et 2 suppressions
  1. 35 0
      .github/workflows/monkey_freebsd.yml
  2. 1 1
      packages/l/libwebp/xmake.lua
  3. 2 1
      scripts/monkey.lua

+ 35 - 0
.github/workflows/monkey_freebsd.yml

@@ -0,0 +1,35 @@
+name: Monkey (FreeBSD)
+
+on:
+  schedule: # execute every 24 hours
+    - cron: "0 */24 * * *"
+
+jobs:
+  build:
+    strategy:
+      matrix:
+        os: [macOS-latest]
+        kind: [static, shared]
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+      - uses: actions/checkout@v1
+
+      - name: Tests
+        uses: vmactions/[email protected]
+        with:
+          usesh: true
+          mem: 4096
+          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 dev --depth 2
+            cd /tmp/xmake-repo
+            xmake l ./scripts/monkey.lua -D -k ${{ matrix.kind }}
+
+

+ 1 - 1
packages/l/libwebp/xmake.lua

@@ -19,7 +19,7 @@ package("libwebp")
 
     add_deps("cmake")
     add_deps("libpng", "libjpeg", "libtiff", "giflib")
-    if is_plat("linux") then
+    if is_plat("linux", "bsd") then
         add_syslinks("pthread")
     end
 

+ 2 - 1
scripts/monkey.lua

@@ -123,7 +123,8 @@ function main(...)
     local packages = argv.packages or {}
     if #packages == 0 then
         local files = os.files(path.join(os.scriptdir(), "..", "packages", "*", "*", "xmake.lua"))
-        while #packages < 10 do
+        local limit = is_host("bsd") and 1 or 10
+        while #packages < limit do
             local file = files[math.random(#files)]
             if file:find("packages", 1, true) and path.filename(file) == "xmake.lua" then
                 assert(file == file:lower(), "%s must be lower case!", file)