start preparations for new travis

update appveyor
add blocks for tests on platforms where things are expected to fail
prepare for LuaJIT
This commit is contained in:
ThePhD 2017-12-25 20:18:29 -05:00
parent 6d2100e814
commit fc6ccdfa7e
6 changed files with 51 additions and 30 deletions

View File

@ -23,22 +23,25 @@
sudo: required sudo: required
language: cpp language: cpp
before_install:
- sudo apt install -y python3 build-essential git docker.io
- sudo docker pull ubuntu
- sudo docker run -d ubuntu
- sudo docker ps -a
script:
- sudo docker
notifications: notifications:
webhooks: webhooks:
urls: urls:
- https://webhooks.gitter.im/e/b864d553270a069d26c8 - https://webhooks.gitter.im/e/b864d553270a069d26c8
on_success: change # options: [always|never|change] default: always on_success: change
on_failure: always # options: [always|never|change] default: always on_failure: always
on_start: never # options: [always|never|change] default: always on_start: never
email: email:
on_success: change on_success: change
on_failure: change on_failure: change
on_start: never
before_install:
- docker pull ubuntu
- docker run -d ubuntu
- docker ps -a
script:
- sudo apt-get install python3 build-essentials git

View File

@ -51,12 +51,25 @@ matrix:
- MINGW_VERSION: 5.3.0 - MINGW_VERSION: 5.3.0
- MINGW_VERSION: 6.3.0 - MINGW_VERSION: 6.3.0
exclude: exclude:
- platform: x86
LUA_VERSION: 5.2.4
- platform: x86
LUA_VERSION: 5.1.5
- image: Visual Studio 2017 - image: Visual Studio 2017
MINGW_VERSION: 6.3.0 MINGW_VERSION: 6.3.0
- image: Visual Studio 2017 - image: Visual Studio 2017
MINGW_VERSION: 5.3.0 MINGW_VERSION: 5.3.0
init: init:
# make sure we have Ninja
- md tools
- cd tools
- set NINJA_URL="https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -o%cd%\ninja
- set PATH=%cd%\ninja;%PATH%
- cd ..
# configure the generator appropriately
- set arch= - set arch=
- if "%PLATFORM%"=="x64" (set arch= Win64) - if "%PLATFORM%"=="x64" (set arch= Win64)
- echo %APPVEYOR_BUILD_WORKER_IMAGE% - echo %APPVEYOR_BUILD_WORKER_IMAGE%
@ -65,7 +78,10 @@ init:
- if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (set CMAKE_GENERATOR=Visual Studio 12 2013%arch%) - if "%APPVEYOR_BUILD_WORKER_IMAGE%"=="Visual Studio 2013" (set CMAKE_GENERATOR=Visual Studio 12 2013%arch%)
- if "%MINGW_VERSION%"=="5.3.0" (set CMAKE_GENERATOR=Ninja) - if "%MINGW_VERSION%"=="5.3.0" (set CMAKE_GENERATOR=Ninja)
- if "%MINGW_VERSION%"=="6.3.0" (set CMAKE_GENERATOR=Ninja) - if "%MINGW_VERSION%"=="6.3.0" (set CMAKE_GENERATOR=Ninja)
- echo "%CMAKE_GENERATOR%" # print out useful information
- ninja --version
- cmake --version
- echo cmake generator -- "%CMAKE_GENERATOR%"
# We need to use CMAKE_BUILD_TYPE=Release since there are no "configuration" # We need to use CMAKE_BUILD_TYPE=Release since there are no "configuration"
# toolsets for Ninja or Makefiles as far as cmake is concerned, so # toolsets for Ninja or Makefiles as far as cmake is concerned, so

View File

@ -261,7 +261,7 @@ Otherwise, the following is used to specify functions to bind on the specific us
* ``"{name}", sol::readonly( &type::member_variable )`` * ``"{name}", sol::readonly( &type::member_variable )``
- Binds a typical variable to ``"{name}"``. Similar to the above, but the variable will be read-only, meaning an error will be generated if anything attemps to write to this variable - Binds a typical variable to ``"{name}"``. Similar to the above, but the variable will be read-only, meaning an error will be generated if anything attemps to write to this variable
* ``"{name}", sol::as_function( &type::member_variable )`` * ``"{name}", sol::as_function( &type::member_variable )``
- Binds a typical variable to ``"{name}"`` *but forces the syntax to be callable like a function*. This produces a getter and a setter accessible by ``obj:name()`` to get and ``obj::name(value)`` to set. - Binds a typical variable to ``"{name}"`` *but forces the syntax to be callable like a function*. This produces a getter and a setter accessible by ``obj:name()`` to get and ``obj:name(value)`` to set.
* ``"{name}", sol::property( getter_func, setter_func )`` * ``"{name}", sol::property( getter_func, setter_func )``
- Binds a typical variable to ``"{name}"``, but gets and sets using the specified setter and getter functions. Not that if you do not pass a setter function, the variable will be read-only. Also not that if you do not pass a getter function, it will be write-only - Binds a typical variable to ``"{name}"``, but gets and sets using the specified setter and getter functions. Not that if you do not pass a setter function, the variable will be read-only. Also not that if you do not pass a getter function, it will be write-only
* ``"{name}", sol::var( some_value )`` or ``"{name}", sol::var( std::ref( some_value ) )`` * ``"{name}", sol::var( some_value )`` or ``"{name}", sol::var( std::ref( some_value ) )``

View File

@ -24,8 +24,8 @@
file(GLOB SOL2_TEST_SOURCES test*.cpp) file(GLOB SOL2_TEST_SOURCES test*.cpp)
source_group(test_sources FILES ${SOL2_TEST_SOURCES}) source_group(test_sources FILES ${SOL2_TEST_SOURCES})
#file(DOWNLOAD https://github.com/catchorg/Catch2/releases/download/v2.0.1/catch.hpp ${CMAKE_BINARY_DIR}/Catch/include/catch.hpp)
file(DOWNLOAD https://github.com/catchorg/Catch2/releases/download/v2.0.1/catch.hpp ${CMAKE_BINARY_DIR}/Catch/include/catch.hpp) file(DOWNLOAD https://github.com/catchorg/Catch2/releases/download/v1.11.0/catch.hpp ${CMAKE_BINARY_DIR}/Catch/include/catch.hpp)
function(CREATE_TEST test_target_name test_name is_single) function(CREATE_TEST test_target_name test_name is_single)
if (is_single) if (is_single)

View File

@ -331,6 +331,7 @@ TEST_CASE("functions/returning functions from C++", "check to see if returning a
} }
} }
#if defined(SOL_LUAJIT) || (defined(_WIN32) && (defined(_WIN64)))
TEST_CASE("functions/function_result and protected_function_result", "Function result should be the beefy return type for sol::function that allows for error checking and error handlers") { TEST_CASE("functions/function_result and protected_function_result", "Function result should be the beefy return type for sol::function that allows for error checking and error handlers") {
sol::state lua; sol::state lua;
lua.open_libraries(sol::lib::base, sol::lib::debug); lua.open_libraries(sol::lib::base, sol::lib::debug);
@ -438,6 +439,7 @@ TEST_CASE("functions/function_result and protected_function_result", "Function r
REQUIRE(value == 100); REQUIRE(value == 100);
} }
} }
#endif // x86 VC++ in release mode
TEST_CASE("functions/all kinds", "Register all kinds of functions, make sure they all compile and work") { TEST_CASE("functions/all kinds", "Register all kinds of functions, make sure they all compile and work") {
sol::state lua; sol::state lua;