Fix. Warning about undefined `pthread_kill` on some systems. (Close #8 #10)
authorAlexey Melnichuk <alexeymelnichuck@gmail.com>
Thu, 2 Feb 2017 08:42:04 +0000 (11:42 +0300)
committerAlexey Melnichuk <alexeymelnichuck@gmail.com>
Thu, 2 Feb 2017 08:42:04 +0000 (11:42 +0300)
.travis.yml
appveyor.yml [new file with mode: 0644]
src/llthread.c

index 335473d..c4f54b4 100644 (file)
@@ -2,16 +2,24 @@ sudo: false
 
 matrix:
   include:
+    - compiler: ": Lua51-osx"
+      env: LUA="lua 5.1"
+      os: osx
     - compiler: ": Lua51"
       env: LUA="lua 5.1"
+      os: linux
     - compiler: ": Lua52"
       env: LUA="lua 5.2"
+      os: linux
     - compiler: ": Lua53"
       env: LUA="lua 5.3"
+      os: linux
     - compiler: ": LuaJIT20"
       env: LUA="luajit 2.0"
+      os: linux
     - compiler: ": LuaJIT21"
       env: LUA="luajit 2.1"
+      os: linux
 
 cache:
   directories:
@@ -24,6 +32,8 @@ branches:
 
 before_install:
   - export CC=gcc
+  - gcc --version
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH=$PATH:~/Library/Python/2.7/bin/; fi
   - pip install --user hererocks
   - hererocks here -r^ --$LUA;
   - export PATH=$PATH:$PWD/here/bin
@@ -52,7 +62,7 @@ script:
   - lua test_threads_ex_opt_2.lua
   - lua test_threads_attr.lua
   - lua test_integer.lua
-  # - lua$LUA_SFX test_register_llthreads.lua
+  # - lua test_register_llthreads.lua
 
 notifications:
   email:
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644 (file)
index 0000000..db2206e
--- /dev/null
@@ -0,0 +1,78 @@
+version: 0.3.2.{build}
+
+os:
+- Windows Server 2012 R2
+
+shallow_clone: true
+
+environment:
+  LR_EXTERNAL: c:\external
+
+  matrix:
+  - LUA: "lua 5.1"
+  - LUA: "lua 5.2"
+  - LUA: "lua 5.3"
+
+platform:
+  - x64
+  - x86
+  # - mingw
+
+cache:
+  - c:\hererocks -> appveyor.yml
+  - c:\external -> appveyor.yml
+
+install:
+  - echo "Setup..."
+  - set PATH=C:\Python27\Scripts;%LR_EXTERNAL%;%PATH%
+  - if /I "%platform%"=="x86" set HR_TARGET=vs_32
+  - if /I "%platform%"=="x64" set HR_TARGET=vs_64
+  - if /I "%platform%"=="mingw" set HR_TARGET=mingw
+  - if /I "%platform%"=="mingw" set PATH=C:\MinGW\bin;%PATH%
+  - if not exist "%LR_EXTERNAL%" (
+      mkdir "%LR_EXTERNAL%" &&
+      mkdir "%LR_EXTERNAL%\lib" &&
+      mkdir "%LR_EXTERNAL%\include"
+    )
+  - if not exist c:\hererocks (
+      pip install hererocks &&
+      hererocks c:\hererocks --%LUA% --target %HR_TARGET% -rlatest
+    )
+  - call c:\hererocks\bin\activate
+
+before_build:
+  # external deps
+
+build_script:
+  - echo "Making..."
+  - luarocks make rockspecs/lua-llthreads2-compat-scm-0.rockspec
+  - luarocks make rockspecs/lua-llthreads2-scm-0.rockspec
+
+before_test:
+  # test deps
+
+test_script:
+  - echo "Testing..."
+  - cd %APPVEYOR_BUILD_FOLDER%\test
+  - lua test_version.lua
+  - lua test_table_copy.lua
+  - lua test_threads.lua 10
+  - lua test_llthreads.lua
+  - lua test_join_timeout.lua
+  - lua test_join_detach.lua
+  - lua test_join_error.lua
+  - lua test_register_ffi.lua
+  - lua test_logger.lua
+  - lua test_pass_cfunction.lua
+  - lua test_load_llthreads2.lua
+  - lua test_alive.lua
+  - lua test_threads_ex.lua 10
+  - lua test_threads_ex_arg.lua
+  - lua test_threads_ex_opt.lua
+  - lua test_threads_ex_opt_2.lua
+  - lua test_threads_attr.lua
+  - lua test_integer.lua
+  # - lua test_register_llthreads.lua
+
+after_test:
+  # deploy
index 97405d0..eee7290 100644 (file)
@@ -12,6 +12,9 @@
 #  include <process.h>
 #else
 #  include <pthread.h>
+#  ifndef _WIN32
+#    include <signal.h>
+#  endif
 #endif
 
 #include <stdlib.h>