diff --git a/nix_ci.yml b/.github/workflows/nix_ci.yml similarity index 100% rename from nix_ci.yml rename to .github/workflows/nix_ci.yml diff --git a/tests/conf.lua b/tests/conf.lua index d88343f..6b728c5 100644 --- a/tests/conf.lua +++ b/tests/conf.lua @@ -15,9 +15,8 @@ function love.conf(t) t.modules.mouse = false -- Enable the mouse module (boolean) t.modules.physics = false -- Enable the physics module (boolean) t.modules.sound = false -- Enable the sound module (boolean) - t.modules.system = false -- Enable the system module (boolean) - t.modules.timer = false -- Enable the timer module (boolean) + t.modules.system = true -- Enable the system module (boolean) + t.modules.timer = true -- Enable the timer module (boolean) t.modules.window = false -- Enable the window module (boolean) t.modules.thread = true -- Enable the thread module (boolean) end ---1440 x 2560 diff --git a/tests/threadtests.lua b/tests/threadtests.lua index 2ca047c..615f85d 100644 --- a/tests/threadtests.lua +++ b/tests/threadtests.lua @@ -37,6 +37,12 @@ THREAD.setENV({ }) multi:newThread("Scheduler Thread",function() + multi:newThread(function() + thread.sleep(30) + print("Timeout tests took longer than 30 seconds") + multi:Stop() + os.exit(1) + end) queue = multi:newSystemThreadedQueue("Test_Queue"):init() multi:newSystemThread("Test_Thread_0", function() @@ -172,12 +178,12 @@ multi:newThread("Scheduler Thread",function() -- end -- multi.success("SystemThreadedConnections: Ok") - local stp = multi:newSystemThreadedProcessor(8) - + local stp = multi:newSystemThreadedProcessor(1) + print(stp) local tloop = stp:newTLoop(nil, 1) - + print(2) local proxy_test = false - + print(3) multi:newSystemThread("Testing proxy copy THREAD",function(tloop) local multi, thread = require("multi"):init() tloop = tloop:init() @@ -194,10 +200,10 @@ multi:newThread("Scheduler Thread",function() end) multi:mainloop() end, tloop:getTransferable()).OnError(multi.error) - + print(4) multi.print("tloop", tloop.Type) multi.print("tloop.OnLoop", tloop.OnLoop.Type) - + print(5) thread:newThread(function() multi.print("Testing holding on a proxy connection!") thread.hold(tloop.OnLoop) @@ -206,6 +212,7 @@ multi:newThread("Scheduler Thread",function() multi.print("Held on proxy connection... twice") proxy_test = true end).OnError(print) + print(6) thread:newThread(function() while true do @@ -232,6 +239,7 @@ multi:newThread("Scheduler Thread",function() multi.success("SystemThreadedProcessor: OK") we_good = true + multi:Stop() os.exit() end).OnError(multi.error) diff --git a/win_ci.yml b/win_ci.yml deleted file mode 100644 index 800c9fb..0000000 --- a/win_ci.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: build & run tests (Win) - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -jobs: - build: - strategy: - fail-fast: false - matrix: - build-type: [Release] # Debug - lua: ["lua 5.1", "lua 5.2", "lua 5.3", "luajit 2.0"] - os: ["windows-2019"] - platform: [ - {"forLua": "vs_32", "forCMake": "Win32"}, - {"forLua": "vs_64", "forCMake": "x64"}, - ] - exclude: - - lua: "luajit 2.0" - platform: {"forLua": "vs_32", "forCMake": "Win32"} - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v2 - with: - submodules: recursive - - uses: actions/setup-python@v2 - with: - python-version: '3.8' - - name: Setup env - run: | - pip install hererocks - hererocks lua-pkg --${{ matrix.lua }} -rlatest --target ${{matrix.platform.forLua}} - cmd ${{github.workspace}}\lua-pkg\bin\activate - - - name: Configure CMake & build - run: | - cmake -A ${{matrix.platform.forCMake}} -B ${{github.workspace}}\build -DLUA_INCLUDE_DIR="${{github.workspace}}/lua-pkg/include" -DLUA_LIBRARY="${{github.workspace}}/lua-pkg/lib/lua*.lib" - cmake --build ${{github.workspace}}/build --config ${{matrix.build-type}} - - - name: Test - working-directory: ${{github.workspace}}/build - env: - STRESS: 1 - run: | - ${{github.workspace}}/lua-pkg/bin/lua ../tests/lua/run_tests