Commit graph

419 commits

Author SHA1 Message Date
Leroy Hopson
fcad5d64b9
fix: use correct bits
Turns out the 32bit tests were actually using 64bit Godot and testing
the 64bit binaries.

This commit ensures that the tests use the correct builds and adds
32bit linux to the gdextension file.
2024-03-30 20:49:15 +13:00
Leroy Hopson
7778d68578
fix(ci): add run number and attempt to job name
Ensures that 'wait-for-check' will wait for builds of the same run
regardless of if there have been successful builds for other runs of the
same comit (e.g. when changes are menged in to main causing the branch
to be fast-forward and hence running CI for the same commit).
2024-03-30 20:29:42 +13:00
Leroy Hopson
5c6bcc45e3
Revert "fix(ci): make tests need builds to complete"
This reverts commit f9f055f08e.
2024-03-30 15:49:55 +13:00
Leroy Hopson
4afa6f770b
chore(bot): update dependabot pr labels 2024-03-30 02:59:20 +13:00
dependabot[bot]
e37062da18 chore(deps): bump mymindstorm/setup-emsdk from 11 to 14
Bumps [mymindstorm/setup-emsdk](https://github.com/mymindstorm/setup-emsdk) from 11 to 14.
- [Release notes](https://github.com/mymindstorm/setup-emsdk/releases)
- [Commits](https://github.com/mymindstorm/setup-emsdk/compare/v11...v14)

---
updated-dependencies:
- dependency-name: mymindstorm/setup-emsdk
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:52:24 +13:00
Leroy Hopson
f9f055f08e
fix(ci): make tests need builds to complete
The wait for action is not reliable, so tests are running before builds
have completed. By adding the explicit needs, tests will run at the
right time, but it will make workflow runs a bit slower.
2024-03-30 02:32:23 +13:00
Leroy Hopson
cf0b43f19d
chore(license): update license text
Updates year range and simplifies copyright text.
2024-03-30 02:26:31 +13:00
Leroy Hopson
a1a129cb68
chore(docs): update godot version badge 2024-03-30 02:25:37 +13:00
Leroy Hopson
e6e867d9cd docs: add message about inaccuracy of current documentation
A number of changes have been made to the build process which are not
documented. This commit adds a message to the documentation about this.
2024-03-30 02:19:56 +13:00
Leroy Hopson
d7c83b3fe9
chore(tidyup): remove old unused code
This code was left around for reference during development, but is no
longer used or needed.
2024-03-30 02:19:01 +13:00
dependabot[bot]
c4f0afc4f2 chore(deps): bump fountainhead/action-wait-for-check from 1.1.0 to 1.2.0
Bumps [fountainhead/action-wait-for-check](https://github.com/fountainhead/action-wait-for-check) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/fountainhead/action-wait-for-check/releases)
- [Commits](https://github.com/fountainhead/action-wait-for-check/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: fountainhead/action-wait-for-check
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:06:09 +13:00
dependabot[bot]
51e7fa651c chore(deps): bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-30 02:05:54 +13:00
Leroy Hopson
79848327d6
chore(import): don't import documentation files 2024-03-30 01:37:54 +13:00
Leroy Hopson
5cd298c124
chore(imports): automatic editor import updates 2024-03-30 01:36:15 +13:00
Leroy Hopson
1d2898f6ab
chore(spelling): add codespell pre-commit hook
Fixes spelling mistakes identified by it.
2024-03-30 01:27:28 +13:00
Leroy Hopson
bc15d8950f
docs(rtd): move documentation to read the docs 2024-03-30 01:20:07 +13:00
Leroy Hopson
0bd0d39f41
feat(pty): add cols/rows methods and resize tests 2024-03-29 01:27:42 +13:00
Leroy Hopson
d00a31fb45
feat(term): implement clear() method
Clears all but the bottommost row of the terminal (including scrollback
buffer) and moves the bottommost row to the top.
2024-03-03 22:39:51 +13:00
Leroy Hopson
fc03595e29
fix(ci): fix additional gut test success condition
Was missing `grep -q`, also adds an additional check for when no tests
were run whatsoever.
2024-03-03 21:14:00 +13:00
Leroy Hopson
71df1e71bd
feat(term): implement copy_all()
Implements the copy_all() method which copies all text in the screen
including text in the scrollback buffer.

Includes a fix to an upstream bug in libtsm that resulted in double the
number of '\n' characters being copied for each row.
2024-03-03 21:04:42 +13:00
Leroy Hopson
8255d8b3ce
fix(ci): exclude godot-cpp and libtsm from cache
The godot-cpp and libtsm dependecies are built via the SConstruct file
and therefore can be handled by the SCons cache. By caching the
seperately, changes to the submodules were being overwritten.
2024-03-03 21:04:40 +13:00
Leroy Hopson
fa28b7d6c2
fix(term): remove selection mode enum from tests
The SelectionMode enum is only used internally, so it can be removed
from tests of the public interface.
2024-03-03 21:04:16 +13:00
Leroy Hopson
13cf5ba023
feat(term): implement copy_selection()
Implements the copy_selection() method, which returns the selected text.

Adds a copy_on_selection property. When this property is enabled, the
selected text will automatically be copied to the primary clipboard
(Linux X11/Wayland only).
2024-03-03 21:04:16 +13:00
Leroy Hopson
7f03761fb2
fix(pty): remove non-portable signal enums
Remove signal enum members which do not use portable numbers, and
therefore may be different on different operating systems.
2024-03-03 21:04:16 +13:00
Leroy Hopson
b78bdf3136
feat(pty): rename get_pts() -> get_pts_name() 2024-03-03 21:04:16 +13:00
Leroy Hopson
c6609ebae5
feat(compat): make compatible with godot v4.2+
Previously the plugin could only be used with v4.2.1. This commit
extends support support back to v4.2.0.
2024-03-03 21:04:10 +13:00
Leroy Hopson
1a5f0f96da
chore(test): update tests
Adds additional tests for the interface. Creates a new base test class
GodotXtermTest that adds some additional assert methods. Tests
inheriting from this should override the got_described_class() method.
Add instance of the described class named 'subject' will be created and
added to the scene tree before each test.
2024-03-03 15:41:30 +13:00
Leroy Hopson
cb86cc95d7
fix(pty): use double, not float, for blink times
Changes blink_on_time and blink_off_time to use double rather than
float. When float was used, the default blink_off_time of 0.3 was being
converted to 0.30000001192093 in GDScript.
2024-03-03 15:41:27 +13:00
Leroy Hopson
481a1cb04a
fix(pty): create a loop per pty
Prevents segmentation faults due to several threads trying to run the
same (default) loop.
2024-03-03 00:15:07 +13:00
Leroy Hopson
a0c9777264
feat(pty): add multithread support
Adds the option `use_threads` to PTY (enabled by default) which improves
performance when enabled. For example, running `time cat file.txt` where
file is ~4.5MB will take ~0.250s with threads enabled, versus >20s when
disabled.
2024-03-02 22:49:48 +13:00
Leroy Hopson
46f3aa12bf
chore(ci): enable debug symbols for debug builds
Exclude Windows as it leads to a "warning LNK4099: PDB '' was not found
with 'constants.windows.template_debug.x86_64.obj' or at ''" error on
subsequent runs.
2024-03-02 22:49:42 +13:00
Leroy Hopson
e1000adbe5
feat(pty): call _close() on NOTIFICATION_EXIT_TREE 2024-03-01 22:42:37 +13:00
Leroy Hopson
8fa7df29d3
feat(pty): rename statuses
- NONE -> CLOSED.
- CONNECTED -> OPEN.
- Remove CONNECTING.
2024-03-01 22:35:47 +13:00
Leroy Hopson
80ae0020da
chore(style): change indentation 2024-03-01 22:31:53 +13:00
Leroy Hopson
39b5614f61
feat(pty): use process internal, not _process 2024-03-01 20:28:03 +13:00
Leroy Hopson
91aee43a30
chore(build): enable debug symbols by default 2024-03-01 19:11:47 +13:00
Leroy Hopson
a1be7fb4c3
chore(style): make variable names consistent
Makes the Terminal::_set() variable names consistent with the header
file and the _get() and _get_property_list() methods.
2024-02-27 22:12:29 +13:00
Leroy Hopson
a596b41bc3
feat(term): make 'cols' and 'rows' read-only
Removes the set_cols() and set_rows() method. The read-only properties
are still visible in the editor inspector.
2024-02-27 22:12:07 +13:00
Leroy Hopson
84e1126824
feat(pty): enable resize and resizev 2024-02-25 23:17:45 +13:00
Leroy Hopson
1da42501af
feat(term): add "size_changed" signal
Will be emitted when the number of cols or rows changes.
2024-02-25 22:36:22 +13:00
Leroy Hopson
ee920a45fd
feat(pty): parse env so it can be used with fork
Adds method to convert env from a Dictionary to a PackedStringArray so
it can be used with fork(). Consider making env a PackedStringArray to
begin with.
2024-02-25 22:10:34 +13:00
Leroy Hopson
8cd11fdae6
fix(term): prevent double keyboard input
Disconnects the "gui_input" signal as the _gui_input() override is
working as expected now. Having this signal connected was causing it to
be called twice for every input.
2024-02-25 22:06:58 +13:00
Leroy Hopson
cf0beee0c1
feat(pty): implement "write" method 2024-02-25 21:24:53 +13:00
Leroy Hopson
988788fc68
feat(term): implement data_sent signal 2024-02-25 21:14:03 +13:00
Leroy Hopson
14288352fd
fix(term): address clang warnings 2024-02-25 20:53:09 +13:00
Leroy Hopson
43634affa3
chore(just): update test recipe
Updates the test recipe to use the os_family() function to determine
which test files to include.

Renames 'test_unix.gd' -> 'test_nix.gd'.
2024-02-25 20:51:29 +13:00
Leroy Hopson
05b19c1336
feat(term): implement "key_pressed" signal
Also adds tests for write response as code relating to this was
modified.
2024-02-25 20:25:32 +13:00
Leroy Hopson
c36500615d
feat(pty): further pty development 2024-02-25 17:55:31 +13:00
Leroy Hopson
52a259b019
Run all test types on single runner 2024-02-25 17:21:13 +13:00
Leroy Hopson
f901d18052
Modify matrix 2024-02-25 17:21:09 +13:00