diff --git a/.travis.yml.new b/.new.travis.yml similarity index 71% rename from .travis.yml.new rename to .new.travis.yml index 57f612ce..7e78573d 100644 --- a/.travis.yml.new +++ b/.new.travis.yml @@ -23,22 +23,25 @@ sudo: required language: cpp -notifications: - webhooks: - urls: - - https://webhooks.gitter.im/e/b864d553270a069d26c8 - on_success: change # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: never # options: [always|never|change] default: always - email: - on_success: change - on_failure: change - - before_install: -- docker pull ubuntu -- docker run -d ubuntu -- docker ps -a +- 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 apt-get install python3 build-essentials git +- sudo docker + +notifications: + webhooks: + urls: + - https://webhooks.gitter.im/e/b864d553270a069d26c8 + on_success: change + on_failure: always + on_start: never + email: + on_success: change + on_failure: change + on_start: never + + diff --git a/appveyor.yml b/appveyor.yml index 98c784e2..943973d6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,12 +51,25 @@ matrix: - MINGW_VERSION: 5.3.0 - MINGW_VERSION: 6.3.0 exclude: + - platform: x86 + LUA_VERSION: 5.2.4 + - platform: x86 + LUA_VERSION: 5.1.5 - image: Visual Studio 2017 MINGW_VERSION: 6.3.0 - image: Visual Studio 2017 MINGW_VERSION: 5.3.0 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= - if "%PLATFORM%"=="x64" (set arch= Win64) - 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 "%MINGW_VERSION%"=="5.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" # toolsets for Ninja or Makefiles as far as cmake is concerned, so diff --git a/docs/source/api/usertype.rst b/docs/source/api/usertype.rst index 392c69c1..e67b34c9 100644 --- a/docs/source/api/usertype.rst +++ b/docs/source/api/usertype.rst @@ -261,7 +261,7 @@ Otherwise, the following is used to specify functions to bind on the specific us * ``"{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 * ``"{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 )`` - 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 ) )`` diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index fd2a0f57..c11d4e20 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -24,8 +24,8 @@ file(GLOB SOL2_TEST_SOURCES test*.cpp) 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) if (is_single) diff --git a/tests/test_abort_clean.cpp b/tests/test_abort_clean.cpp index e3aa0e19..0d2d3140 100644 --- a/tests/test_abort_clean.cpp +++ b/tests/test_abort_clean.cpp @@ -1,11 +1,11 @@ -#include - -struct pre_main { - pre_main() { -#ifdef SOL2_CI -#ifdef _MSC_VER - _set_abort_behavior(0, _WRITE_ABORT_MSG); -#endif -#endif - } +#include + +struct pre_main { + pre_main() { +#ifdef SOL2_CI +#ifdef _MSC_VER + _set_abort_behavior(0, _WRITE_ABORT_MSG); +#endif +#endif + } } pm; \ No newline at end of file diff --git a/tests/test_functions.cpp b/tests/test_functions.cpp index 81e3645c..b6c9eaa2 100644 --- a/tests/test_functions.cpp +++ b/tests/test_functions.cpp @@ -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") { sol::state lua; 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); } } +#endif // x86 VC++ in release mode TEST_CASE("functions/all kinds", "Register all kinds of functions, make sure they all compile and work") { sol::state lua;