Commit graph

16 commits

Author SHA1 Message Date
Kevin Eady
3bc28a1c12
github actions cache sqlitecpp 2024-07-19 11:48:09 +02:00
Kevin Eady
62a252ad3a
Add daemon watch mode to ecompile (#630)
* Add libefsw at 3419347

* saving work

* some cleanup

* move to fs::paths

* saving work.. maybe hitting a limit with number of watched dirs?

* migrate to watching only ecompile.cfg specified folders, cleanup/doc

* Display summary between compilations in watch mode; fix cache reuse

* Fix inf loop; some cmake, format changes...

* some windows compilation fixes... tweaks to windows cmake?

* Update Efsw.cmake for build lib changes

* removed debug flag

* silence efsw build
dont add antlr project if it already exists

* Address review comments:
- use std::move on efswwatcher add_*

* add docs

* Add WatchModeByDefault ecompile.cfg option

* iniital work on tests

* Add CI actions

* some changes (passes locally on win, mac, linux)

* Fix fixtures dependency; use ecompile verbose mode

* Add core-changes

* Send ctrl+c instead of killing process

* Proper Python file naming

* Kill ecompile process on windows, SIGINT otherwise

---------

Co-authored-by: turleypol <turley@polserver.com>
2024-03-16 00:08:06 +01:00
turleypol
7849b6cda5
SQL non default port, escape string (#629)
* added sql tests (linux only)

* add mysql_escape_string module function
its now possible to define a port for sql connection. (0 means default
sql port like before)

* escape string can fail, return error in this case

* rebuild antlr

* added docs
2024-03-10 14:31:30 +01:00
Kevin Eady
686090d950
Introduce DAP Debugger (#608)
* Add cppdap debugger library and simple server (#508)

* Add cppdap library

* Add cppdap server

* fixup cmake scripts for windows

* Enable caching of cppdap on GitHub actions

* Fix CMake for cppdap target

* Wait 1s for session close before thread ends

* Address review comments
- Remove unnecessary use of wait_for
- Fix wait_for method

* Do not use SocketClientThread for cppdap clients

* Address review comments
- Cleanup object ownership

* Add authorization and event handling (#510)

* Add authorization and event handling [WIP]

* Use std::weak_ptr; Only allow one debugger conn

* Only attach debugger if dbg file exists

* Cleanup weak_ptr; Fix listeners; Add handler stubs

* Address review comments
- PolLock on uoexec and weakptr access
- Use make_shared when creating client thread

* Add ExecutorDebugListener on_destroy callback

* Use cppdap sockets instead of clib sockets

* Update cppdap repository to 2703cf4

* Implement server address binding

* Update cppdap repository to eeca5ce

* Fix warnings

* Use weak_from_this

* Fix stalled executors on disconnect

* Fix stalled executors on re-attach

* Clear uoexec weakptr on all debugger detaches

* Move server to gamestate

* move DapDebugServer into Network namespace

* move DapDebugServer into GameState for storage

* Move DapDebugServer into NetworkManager

* Fix missing memory include

* Add more events (#513)

* Add more events

* Implement dbg_step_out

* Fix breakpoint clearing

* Add even more events (#515)

* add launch request

* Add custom `processes` command

* fixup loop

* Refactoring to move handlers to member functions

* Add VariablesRequest and ScopesRequest

* use std::varaint for Handles

* add pollocks

* refactor Handles to new file

* move custom messages to proto.h

* move clientthread

* some formatting / cleanup

* Add missing PolLock

* move dap variables creation to Handles

* appobj members

* rename ClientThread to DebugClientThread

* rename LaunchRequest args to arg

* Fix compiler error on size_t

* Add support for EvaluateRequest and SetVariableRequest (#519)

* Update grammar for evaluateUnit

* Cleanup various compiler code

* Add support for EvaluateRequest
Only supports values, variables, element access, member access

* Add report clearing to reinitialize state

* Add support for SetVariableRequest

* Fix CI build errors

* Move ExpressionEvaluator to Bscript

* Fix formatting

* Fix include

* Refactor global and frame variable references

* Encapsulate Executor debugging environment; Fix step over (#524)

* Fix step over

* Some cleanup of executor
- Remove unused debug states
- Rename members for consistency

* move debugging environment to new class

* Move instruction inspection to class

* Cleanup slashes on Windows; Add Executor state to processes response (#527)

* Fix backspaces in script names on Windows

* Fix compilation warnings with data loss

* Use boost::icontains for string comparison

* Add Executor state to processes response

* Updates for libfmt

* Fix tests; Fix cppdap build for Mac universal binary (#607)

* fix tests

* fix cppdap build for mac universal binary

* Update cppdap to 2a4c7cf

* Add tests; Modify launch behavior to not stop at entry (redo) (#609)

* Remove unused setExceptionBreakpoints handler

* Add debugger tests

* Launching a script should not set attaching state

* Add launch tests

* Do not check for connection in debugger tests

* Rename `program` to `script` in protocol structs

* Fix launch stopAtEntry; quote string var values

* Fix compilation error on Windows

* Add configfiles doc entry

* Various fixes for finishing touches; Add core-changes (#610)

* switch cmake projects

* simple docs

* cmake move make_directory

* Fix launch request with relative, absolute, package paths

* make relative paths as absolute in source request

* Add true, false, uninit to ExpressionEvaluator

* Re-add setExceptionBreakpoints to avoid unhandled message errors

* Better debug thread logging with instance numbers

* launched scripts should terminate on disconnect (according to DAP spec)

* Properly handle exited event in client thread

* Add core-changes

* Address Discord comments
- Mention vscode-escript in core-changes
- Re-add "cppdap already built" in cmake

* change cmake escriptgrammarlib visibility to public
2024-01-28 09:49:55 +01:00
turleypol
271a1105ba
added explicit targets for every 3rd party lib (#612)
* added explicit targets for every 3rd party lib
these contain include dirs/libs/compiler defs

* moved each 3rd party lib into a version folder, to give each target a
dedicated include directory.
Now noone should add lib root folder as include dir
Used private linking where possible
disabled building of boost, wasnt used at all

* regnerate boost cache
adapted targets for coverity
2024-01-27 09:06:23 +01:00
turleypol
5744049e26
Antlr4.13.1 (#582)
* remove windows headers from "public" headers, stlutil and pch.

* update antlr, regnerate EscriptGrammar

* CI antlr cache

* added now missing header
2023-12-26 11:15:15 +01:00
Kevin Eady
7a4faf1786
Add support for building universal binaries for macOS (#572)
* universal binaries for src and prebuilt deps

* Rebuild antlr from cache?

* Recache everything

* universalize libssh2

* Pin brew-universalize versions

* Better handling of cxxflags for boost

* Correctly handle cmake message

* Store brew-universalize in bin-build

* Standardize cache keys

* No clue on this compiler flag

* Lets try this boost cxxflag
2023-12-06 22:36:42 +01:00
Kevin Eady
2bd76b9004
Upgrade boost to 1.83.0 (#552)
* Upgrade boost to 1.83.0

* Add /MT for Windows compilation
2023-10-16 07:46:59 +02:00
Kevin Eady
3aeab1b165
Update libcurl to 8.2.1 (#536)
* test new curl

* no clue

* update gitignore for curl

---------

Co-authored-by: turleypol <turley@polserver.com>
2023-08-26 13:42:10 +02:00
turleypol
c3207c5249
updated clang CI (#484)
* updated clang CI

* gcc on mac is also outdated, update in general to 11

* disable gcc on mac due to linker crash

* updated ci action versions since it will fail in the future (eg node
version)

* remove vim swp file
2022-11-28 08:01:50 +01:00
Jakub Kalita
67acb43264
Fixed reading map properties + VS2022 boost update (#455)
* Fixed reading map properties.
* Updated boost version to enable VS2022 builds.
2022-02-18 19:01:40 +01:00
turleypol
591c5eade9
removed installation of already installed mysql-client, caused a conflict. Splitted install, so one failure does not cause failure for every installation (#447) 2021-12-20 09:48:07 +01:00
turleypol
5f79897e4b
Initial range class (#418)
* added area classes
first Area2d tests

* removed unneeded method

* area3d tests

* build fix

* remaining tests

* fixed typo

* zip coverage report before uploading

* renamed area to range. use std::minmax
2021-09-04 18:14:10 +02:00
turleypol
f426a5bb8e
Unittests (#412)
* combined unittests with pol -test. Added it in ctest and integrated it in CI

* fixed compilation

* last compilation errors?

* pol -test needs some fixtures

* activated dynprops unittest

* fixed dynprop test
2021-08-23 07:58:42 +02:00
Eric Swanson
1adcab5644
Upgrade boost to 1.74 (#340)
* boost 1.69

Due to this: https://github.com/boostorg/atomic/issues/15

* build boost with libs for asio

* Boost 1.74

Download from dl.bintray.com/boostorg/ because Boost 1.74 .bz2 is larger than GitHub will allow without LFS

* set BUILD_BYPRODUCTS (just setting one library, and doesn't handle windows..  I don't know what is correct anyway)

* build with b2

* Try Boost.cmake from Kevin

* Specify toolset in configure command line

* Use POL_EXT_LIB_DIR.  Make clib depend on boost, not pol itself

* cache boost for github actions

* Copy-pasta correction

* Cache boost for additional github build workflows

* cache boost for coverage build, updated cache action version

Co-authored-by: Kevin Eady <8634912+KevinEady@users.noreply.github.com>
Co-authored-by: turleypol <turley@polserver.com>
2020-12-23 12:11:32 +01:00
turleypol
6d73472029
Testsuite reorganization, new feature to call exported functions (#237)
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists

return 1 for success everything else is an error

* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing

* added support for used in critical scripts

* use weakptr instead of pid
moved keep_alive flag to uoexecutor

* Function and nethod accept now a argument list

* added docs

* missing docs

* faster shutdown time

* fixed typo

* fixed weird cornercase

* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript

* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set

* boat tests

* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api

* cleanuo scripts for boat and npc

* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted

* bypass windows specific ecompile.cfg logic

* fix for parallel execution

* on windows its called .exe ..

* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile

* configure ecompile.cfg to add absolute path

* early sleepms calls can lead to endless waiting

* Code coverage (#260)

* play with coverage reports

* fix yml

* use 0 as default for gcov cmake var

* fixed used cov version, hopefully fixed now cmake

* demangle function names

* removed debug msg

* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking

* added https://coveralls.io/github/polserver/polserver

* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds

* added storage tests..
docs need fixes, the Imps are not working at all

* fixed storage test to really move items

* added a house
corrected static/dynamic flag
created a few house tests

* updated yml file to new github api

* corrected coverage discord job name

* always put to runlist even if not necessary

* extended aos prop tests

* equip/unequip aos mod

* extra ci step for shard test fixtures and activated verbose shard test

* use extra ci step for all build configs, sorted testscripts for
execution

* fixed sorting

* added param to syslog to not print the context (cleaner testscript
visualization)

* added build targets for tests

* sleep api cleanup

* more aos property tests

* build for coveralls also on pullrequest

* readded debug state reset on schedule

* updated checkout ci action

* updated checkout in all ci runs
2020-12-16 18:56:10 +01:00