Commit Graph

39 Commits

Author SHA1 Message Date
Peter Johnson
96fb033deb [build] Remove cmake Java support (#8952)
This is increasingly difficult to maintain, and has very limited
benefit. Modern coprocessors with enough horsepower to run Java
applications can use the Gradle or Bazel build systems instead.
2026-06-05 15:05:09 -07:00
Gold856
ac41523eb4 [ci] Run wpilibc through asan (#8868) 2026-05-23 16:40:32 -07:00
project516
8c5c535e1b [ci] bump sccache-action to v0.0.10 (#8839)
GitHub will force actions to run on node 24 on September 16th, 2026:
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

sccache-action v0.0.9 which is present does not support node 24

sccache-action v0.0.10 adds support:
https://github.com/Mozilla-Actions/sccache-action/releases/tag/v0.0.10
2026-05-07 11:03:09 -06:00
Matt Morley
db42c6cbba [wpinet] Add mDNS discovery tests and fix mDNS JNI bugs (#8682)
In https://github.com/wpilibsuite/allwpilib/issues/8681 we discovered
that multicast service types need to be valid (end with _tcp or _udp),
or else errors are silently swallowed. Let's make our C++ unit test use
a valid name and also check that it works. I think if we
should/shouldn't do this is up for debate still.

I also discovered two bugs in the JNI code that lead to incorrect
results being returned
- Return array index was always 0
- Use of JLocal for the return value seems to mean that the array will
always be NULL in java
2026-03-29 20:41:32 -07:00
sciencewhiz
8fbaf4c2f5 [ci] Update github actions to use Node 24 versions (#8521)
https://github.blog/changelog/2025-09-19-deprecation-of-node-20-on-github-actions-runners/

Done on the 2027 branch since the force change to Node 24 should (tm)
happen after the last 2026 release. And in case it breaks something and
we do need to backport to 2026, the release timeline on 2027 is not as
strict
2025-12-31 09:13:01 -08:00
Peter Johnson
02c8d5c9db [hal] Revamp notifiers (#8424)
This changes the HAL notifier interface to:
- Use wpiutil signal objects. This means waiting is done through the
`WPI_WaitObject` API instead of a dedicated function and allows for
higher level code to simultaneously wait on notifiers and other events.
- Interval timers are supported at the HAL layer
- Handlers are now required to acknowledge notifications. This is
invisible to users unless they're directly using the HAL API.
- For interval timers, an overrun count is maintained to detect if the
handler didn't acknowledge

The underlying implementation still uses condition variables for the
actual waiting. In basic testing using this approach seemed to be lower
jitter than timerfd.

Currently, the simulation and systemcore implementations are nearly
identical except for a few additional sim hook bits. This could be
refactored, but keeping them separate may make sense to keep the
systemcore implementation easy to read and reason about, or if we ever
choose to use a different underlying timer implementation on systemcore.

The simulation side API is unchanged in form but does change in
function--waiting for notifiers now only waits for currently running (or
newly signaled) notifiers to acknowledge. To avoid a race condition in
sim stepTiming, users of the low level API must make any alarm updates
(especially for one-shot alarms) prior to acknowledging the previous
alarm.

The only current use of the interval timer feature is the `Notifier`
class. The `TimedRobot` implementation still uses a single notifier and
its own interval timing logic to ensure consistent callback order. Using
separate notifiers for each user-level interval would substantially
increase complexity. `Watchdog` also doesn't use the interval timer, as
it's looking for an amount of time since the last `set` call rather than
a recurring interval time.

To reduce flicker, the sim GUI uses a fade out when a timeout goes from
set to unset.

This fixes tsan for wpilib and commands, and also fixes some spurious
test failures.
2025-11-29 11:00:18 -08:00
PJ Reiniger
10b4a0c971 SCRIPT fixup project rename 2025-11-07 23:09:21 -08:00
Gold856
d4311d5a29 [wpiutil,glass,dlt] Replace libprotobuf with upb for dynamic decode (#7988)
libprotobuf is a very annoying dependency to deal with, and with the switch to nanopb for generated C++ code, libprotobuf is only used for dynamic decode in the GUI apps. libprotobuf has been swapped out with upb, a much smaller C-based library that supports reflection and can therefore do dynamic decode. This means we can remove the libprotobuf dependency and stop dealing with build issues because of it.
2025-08-16 22:56:32 -07:00
Peter Johnson
36811211be Merge branch 'main' into 2027 2025-04-25 23:45:43 -07:00
Gold856
b248663386 [ci] Upgrade sccache action (#7914) 2025-04-22 15:27:55 -06:00
Tyler Veness
ed94e3af3e [ci] Upgrade sccache action (#7911) 2025-04-17 18:59:10 -07:00
Tyler Veness
0f0e93722e [ci] Upgrade to Clang 17 sanitizers (#7819) 2025-02-25 19:01:41 -08:00
Tyler Veness
c81bd0c909 [ci] Upgrade to Ubuntu 24.04 (#7496) 2024-12-07 21:20:48 -08:00
Thad House
c387a7ecae [build] Update to 2025 compilers (#7462) 2024-11-30 10:07:53 -08:00
Ryan Blue
5d68f0c11a [ci] Fix CMake caching to Artifactory (#7058) 2024-09-08 20:51:25 -07:00
Ryan Blue
7f6f19eef4 [ci] Use artifactory for sccache backend (#7049) 2024-09-07 22:21:56 -07:00
Gold856
76a3a60712 [ci] Bump actions versions to Node 20 (#6758)
Bump webfactory/ssh-agent to 0.9.0 (Node 20)
Switch to gradle/actions/wrapper-validation (Node 20)
Bump mozilla-actions/sccache-action to 0.0.5 (Node 20 for sanitizers only)
Bump actions/github-script to 7 (Node 20 for documentation only)
Bump wpilibsuite/import-signing-certificate to 2 (Node 20)
Bump JamesIves/github-pages-deploy-action to 4.6.1 (Node 20)
2024-06-21 20:53:51 -07:00
Gold856
7f5970b27a [ci] Remove unused steps/package installs (#6756)
Removed steps/packages were used for protobuf/generated files
2024-06-21 11:15:42 -07:00
Jade
58751338ec [ci] Remove workaround for sanitizers (#6638)
It's been added to the base image.
2024-05-20 12:20:12 -07:00
Peter Johnson
c10f7d91b7 [ci] Work around asan actions bug (#6442) 2024-03-16 11:06:01 -07:00
Isaac Turner
35a1c52788 [build] Upgrade quickbuf to 1.3.3 (#6072) 2023-12-20 22:30:45 -06:00
David Vo
9fa28eb07a [ci] Bump actions/checkout to v4 (#5736)
Co-authored-by: Ryan Blue <ryanzblue@gmail.com>
2023-11-30 21:09:56 -08:00
Ryan Blue
60bcdeded9 [ci] Disable java in sanitizer builds (#5833) 2023-10-26 19:16:58 -07:00
Peter Johnson
cf54d9ccb7 [wpiutil, ntcore] Add structured data support (#5391)
This adds support for two serialization formats for complex data types:

- Protobuf for complex objects with variable length internals that need forward and backward wire compatibility (lower speed, more flexible)
- Raw struct (ByteBuffer-style) for fixed-length objects (higher speed, less flexible)

Deserialization can be done either by creating a new object (for immutable objects) or overwriting the contents of an existing object (for mutable objects).

Implementing classes should provide inner classes that implement the Protobuf or Struct interface (in Java) or specialize the wpi::Protobuf or wpi::Struct struct (in C++). It is possible for classes to implement both. If the class itself does not implement serialization, it's possible for third parties/users to provide an implementation instead.

Uses the Google protobuf implementation for C++ and the QuickBuffers alternative protobuf implementation for Java.
2023-10-19 21:41:47 -07:00
Peter Johnson
a789632052 [build] Update to native utils 2024.3.1 (#5738)
Also switch to 2024 docker images.
2023-10-08 20:16:08 -07:00
Peter Johnson
8f5bcad244 [ci] Use sccache for cmake builds (#5692) 2023-09-29 23:38:01 -07:00
Tyler Veness
d07267fed1 [ci] Upgrade containers to Ubuntu 22.04 and remove libclang installation (#4633) 2022-11-14 14:20:08 -08:00
Peter Johnson
dcfa85a5d5 [ci] Build sanitizers with clang-14 (#4518) 2022-10-24 22:44:20 -07:00
Peter Johnson
1f45732700 [build] Update to 2023.2.4 native-utils and new dependencies (#4473)
* Disable class-memaccess warning in Eigen
* Shim NiFpga_OpenHostMemoryBuffer
* Don't deploy .debug files in integration tests
2022-10-14 23:36:47 -07:00
Peter Johnson
77301b126c [ntcore] NetworkTables 4 (#3217) 2022-10-08 10:01:31 -07:00
Tyler Veness
539070820d [ci] Enable asan for wpinet and wpiutil (#4369) 2022-08-21 14:59:07 -07:00
Peter Johnson
abc605c9c9 [ci] Update workflows to 20.04 base image (#4271) 2022-05-27 23:33:33 -07:00
Peter Johnson
d673ead481 [wpinet] Move network portions of wpiutil into new wpinet library (#4077) 2022-05-07 10:54:14 -07:00
Tyler Veness
bd80e220b9 [ci] Upgrade CMake actions (#4161) 2022-04-12 19:00:00 -07:00
Austin Shalit
d27ed3722b [ci] Set actions workflow concurrency (#4060)
This sets the workflow concurrency to 1 for all workflows. For PRs this means if you push an additional commit older jobs will be cancelled.

The documentation workflow already only runs on tags or merges to main. For this, we cancel previous runs if they are to the same destination (tag or main) but still prevent 2 jobs from running at once if they are spawned from different refs.
2022-02-27 20:13:58 -08:00
Tyler Veness
54ca474dba [ci] Enable asan and tsan in CI for tests that pass (#3591)
ctest's -E flag skips tests that match a regular expression.
2021-09-19 20:03:40 -07:00
Thad House
179fde3a7b [build] Update to 2022 native utils and gradle 7 (#3588) 2021-09-19 17:59:14 -07:00
Peter Johnson
263a248119 [wpimath] Use jinja for codegen (#3574)
While not really needed for wpimath, it will make more complex codegen
in the future significantly easier.
2021-09-17 00:10:29 -07:00
Tyler Veness
906bfc8464 [build] Add CMake build support for sanitizers (#3576)
* Address sanitizer uses -DCMAKE_BUILD_TYPE=Asan
* Thread sanitizer uses -DCMAKE_BUILD_TYPE=Tsan
* Undefined behavior sanitizer uses -DCMAKE_BUILD_TYPE=Ubsan

Only ubsan is enabled in CI for now because asan and tsan report
failures.
2021-09-16 18:48:41 -07:00