Commit Graph

605 Commits (fix-macos-14-builds)

Author SHA1 Message Date
nirenjan 49c57f4a6a Update workflows to use actions/checkout@v4
Since Node 16 has been deprecated, Github is requiring all Actions users
to migrate to Node 20, and therefore use actions/checkout@v4. This also
applies to other jobs that use Node 16 as their runtime.

See: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
2024-06-08 21:38:34 -07:00
nirenjan b0b9123a2e fix: Add CMOCKA_CFLAGS to test program CFLAGS
In macos-14, programs that rely on cmocka need to specify CMOCKA_CFLAGS
as part of their CFLAGS. This has not been an issue so far on older
versions of macOS, or on any release of Ubuntu, but it should be done to
ensure that the library headers can be found.
2024-06-08 21:25:42 -07:00
nirenjan 50a911160f fix: Disable macos-12 builds
macos-12 builds fail with the following error message:

    ld: warning: -undefined dynamic_lookup may not work with chained fixups

This causes the overall build status to be marked as fail, even though
macOS builds are not treated as failing the build. Also, macOS 12 is
going to effectively be end-of-lifed in November 2024, so it's not worth
spending the time to look into this.
2024-06-08 20:57:53 -07:00
nirenjan 7a56af032b fix: Disable mouse tests if cmocka is not present
Cmocka is optional for the builds, but the absence of cmocka causes the
Daemon build to fail when running `make check`. This commit addresses
that issue, while keeping tests that don't need cmocka.
2024-06-05 09:18:01 -07:00
nirenjan c46cec3138 ci: Disable macos-11 and add newer versions
Github has deprecated macos-11 runners and will stop them towards the
end of June 2024.
2024-06-05 09:16:22 -07:00
nirenjan 21050e40a8 Fix syntax of calloc calls in pinelog.c
`calloc` requires the count to be the first argument, and the size
parameter to be the second argument. However, this has not really caused
issues in the past, and older compilers were not so strict about it.

However, newer compilers (at least GCC 14) triggers a warning on this
and causes the build to fail.

Fixes #52
2024-06-04 15:02:27 -07:00
nirenjan 9e2e8cb8ff Add compiler details to bugreport 2023-06-02 00:02:05 -07:00
nirenjan 5f4dfe4c01 Add host details to version-info 2023-06-01 23:33:54 -07:00
nirenjan 0870518598 Disable builds on macOS 12
macOS 12 builds are currently failing with the following error:

    ld: warning: -undefined dynamic_lookup may not work with chained fixups

This is causing the overall CI to fail, therefore, I am disabling it
until such time that this can be fixed.
2023-01-21 02:49:45 -08:00
nirenjan d7b4a694fa Update Github action workflows to use actions/checkout@v3
Due to the Node 12 runtime being deprecated, jobs are required to move
to actions/checkout@v3 which uses Node 16 runtime.

See: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
2023-01-21 02:39:59 -08:00
nirenjan 326ac992ac Fix hyperlink for ChangeLog.md
[skip ci] [skip doxy]
2023-01-21 02:34:17 -08:00
nirenjan d3973a0abf Update daemon protocol documentation
This change ensures that the documentation is in sync with the code.

[skip ci]
2023-01-04 10:07:20 -08:00
nirenjan ebca9566d7 Move common socket code into x52d_comm_internal.c 2023-01-04 08:42:47 -08:00
nirenjan 03c0376e7c Initialize variables to avoid maybe-uninitialized warnings
When building the package for PPA, gcc throws errors indicating that
some variables may be used uninitialized. This is not a real problem
that shows up during the CI build, but only when building using
dpkg-buildpackage.

This change adds some dummy initialization so that it avoids triggering
those warnings during debuild/dpkg-buildpackage.
2023-01-03 12:26:51 -08:00
nirenjan d4412aba3e Update po files for v0.3.0 2022-12-25 22:08:23 -08:00
nirenjan e08c46f6c4 Update for release 0.3.0 2022-12-25 21:57:28 -08:00
nirenjan 708ace20be Fix builds on macOS 2022-09-23 21:15:19 -07:00
nirenjan 4b411d6767 Add notifications when device is connected/disconnected 2022-09-23 15:15:49 -07:00
nirenjan 8b2c0e4a2f Add test cases to verify libx52 identifier to string conversion 2022-09-23 14:28:19 -07:00
nirenjan b810c457f9 Use x52ctl to test daemon communication
This allows us to test x52ctl as well as the daemon communication
infrastructure.
2022-09-23 10:02:17 -07:00
nirenjan ccabb5c953 Add test case for setting unknown configuration value 2022-09-22 22:14:44 -07:00
nirenjan b2f292bf58 Cleanup config dump routine 2022-09-22 21:31:49 -07:00
nirenjan 7f59984357 Ensure notification socket is bound when starting daemon 2022-09-22 21:28:20 -07:00
nirenjan c2c2e91089 Update translation files 2022-09-22 14:45:31 -07:00
nirenjan d60ab7e1e4 Add logging test cases to EXTRA_DIST 2022-09-22 14:45:15 -07:00
nirenjan 2b7c643537 Add test cases for logging command 2022-09-22 14:23:30 -07:00
nirenjan d96b86a817 Return module name in "logging show" command 2022-09-22 14:23:13 -07:00
nirenjan fea095dc50 Add notify module to logging list
The notify module controls the logging settings for the notify socket
code. While missing this doesn't cause any impact to the notify code, an
invalid module name sent on the command socket could cause the daemon to
crash with a NULL pointer access.
2022-09-22 14:21:14 -07:00
nirenjan 1dcadb9428 Rename test cases and add them to EXTRA_DIST 2022-09-22 11:21:53 -07:00
nirenjan ecfb865c58 Fix pattern for daemon tests and sort by filename 2022-09-22 09:39:30 -07:00
nirenjan b1c7a16eac Update daemon documentation to include notify socket
[skip ci]
2022-09-21 20:08:58 -07:00
nirenjan b38a75462d Update translations for new files 2022-09-21 09:31:53 -07:00
nirenjan 619d516ccc Add notify API
This change adds a notification API to libx52dcomm. It also pulls in the
logic to join multiple arguments into a single buffer for later use.
2022-09-06 23:19:03 -07:00
nirenjan 88159d4fc5 Disable deprecated Github-hosted runners 2022-09-02 23:03:53 -07:00
nirenjan c3a4fea139 Update int_parser to reject invalid input 2022-09-01 20:50:36 -07:00
nirenjan 1d1e5781c2 Merge branch 'fix-hotplug' 2022-08-07 09:15:04 -07:00
nirenjan 1a02ad22d9 Handle libusb events when checking if device is connected
libusb requires the application to call one of the
`libusb_handle_events` functions in order for hotplug events to actually
get dispatched. We don't need to wait for any timeout, so we use a
default timeout of 0, which should process any pending events, and then
return immediately.

A test of repeatedly disconnecting and reconnecting a virtual device
using USBIP was done, and no crashes of the daemon were observed.

Github-Issue: https://github.com/nirenjan/libx52/issues/43
2022-08-06 16:49:28 -07:00
nirenjan b822d3aed8 Move command processing into separate thread
This will help in moving a lot of the functionality out of the main
thread, and limit the main thread to just signal handling.
2022-07-27 12:47:53 -07:00
nirenjan dfa78ff2a9 Remove deprecated macos-10.15 runner
See: actions/virtual-environments#5583

References:
- https://github.com/actions/virtual-environments/issues/5583
2022-07-27 11:40:48 -07:00
nirenjan d3d32cf278 Block signals on child threads
This change adds logic to block signals on child threads. This is done
so that we can migrate signal handling to the main thread, even if we
add additional threads in the future.
2022-07-27 11:33:44 -07:00
nirenjan b0f9006594 Update Changelog.md
[skip ci] [skip doxy]
2022-07-24 21:55:38 -07:00
nirenjan 35f5da6b50 Upgrade CodeQL actions to v2
See: https://github.blog/changelog/2022-04-27-code-scanning-deprecation-of-codeql-action-v1/
2022-07-03 21:59:00 -07:00
nirenjan 41812e3c1e Add unit tests for mouse reverse scroll 2022-07-03 16:00:13 -07:00
nirenjan 95a10b5ac9 Add option to reverse mouse scroll direction
This change adds a ReverseScroll parameter to the configuration, which
if set, will change the direction of the scroll wheel of the virtual
mouse.

Github-Issue: #45
2022-06-14 09:36:13 -07:00
nirenjan d0f0232dae Add beta versions of runners to CI build
This change adds support for the public beta of Ubuntu 22.04 and
macOS 12. As this is a beta, this change also updates the
continue-on-error field to indicate that a build failure on the 22.04
runner should not cause the rest of the build to fail.

[skip doxy]
2022-06-13 01:58:46 -07:00
nirenjan ba9348b888 Include locale.h in gettext.h
When building with coverage enabled, the compiler complains about
missing definitions for setlocale and LC_ALL. These can be found in
locale.h, and by including it in gettext.h, we can ensure that we won't
see any more such issues.
2022-06-13 01:45:34 -07:00
nirenjan 0ac3a3d0c4 Add additional tests for x52cli
This change adds additional tests to verify the parser behavior, as well
as the handling of any error conditions from libx52 itself.
2022-06-12 03:37:21 -07:00
nirenjan 552e638b27 Remove obsolete check for invalid handler
Since the introduction of X macros to the CLI handling code, there will
never be a condition where the handler will be NULL. This is a legacy
check from when the code had individual maps that were maintained by
hand.
2022-06-12 03:34:53 -07:00
nirenjan 44fba0c6cd Always return 1 from x52cli for any failure
Prior to this change, on failure condition, x52cli would exit with a
code that mapped directly to the return code of the function. This was
inconsistent with the behaviour if the initialization or connect steps
failed for any reason.
2022-06-12 03:32:25 -07:00
nirenjan a119fe2c60 Fix translation objects 2022-05-16 10:48:07 -07:00