Skip to content

[RN] Run ReactCommon C++ unit tests on GitHub CI - #57782

Draft
mattcarrollcode wants to merge 1 commit into
mainfrom
rn-cxx-unit-tests
Draft

[RN] Run ReactCommon C++ unit tests on GitHub CI#57782
mattcarrollcode wants to merge 1 commit into
mainfrom
rn-cxx-unit-tests

Conversation

@mattcarrollcode

@mattcarrollcode mattcarrollcode commented Jul 31, 2026

Copy link
Copy Markdown

Summary

ReactCommon's C++ unit tests (<subsystem>/tests/*.cpp) ship with the repository
but were not built or run by CI, so the renderer, layout, and runtime C++ core
was only exercised indirectly (integration tests and platform builds).

This adds a small CMake harness under private/react-native-tests that compiles
a representative subset of those gtest suites on Linux and runs them with CTest,
reusing the desktop C++ toolchain and Gradle-staged third-party dependencies
already used by the Fantom tester. A new test_cxx GitHub Actions job builds and
runs the harness on a standard Linux runner.

Suites covered initially: react/renderer/graphics, react/utils,
react/renderer/css; more can be added incrementally (see
private/react-native-tests/README.md). The CI job is advisory
(continue-on-error) so a harness issue cannot block merges, and should be
promoted to a required check once consistently green.

Test Plan

Runs in the new advisory test_cxx CI job on this PR (Linux): builds the CMake
harness and runs the gtest suites via CTest.

Changelog: [Internal]

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 31, 2026
@mattcarrollcode
mattcarrollcode force-pushed the rn-cxx-unit-tests branch 18 times, most recently from 312fb85 to f15fa06 Compare August 1, 2026 02:21
## Summary
ReactCommon's C++ unit tests (`<subsystem>/tests/*.cpp`) ship with the repository
but were not built or run by CI, so the renderer, layout, and runtime C++ core
was only exercised indirectly (integration tests and platform builds).

This adds a small CMake harness under `private/react-native-tests` that compiles
a representative subset of those gtest suites on Linux and runs them with CTest,
reusing the desktop C++ toolchain and Gradle-staged third-party dependencies
already used by the Fantom tester. A new `test_cxx` GitHub Actions job builds and
runs the harness on a standard Linux runner.

Suites covered initially: `react/renderer/graphics`, `react/utils`,
`react/renderer/css`; more can be added incrementally (see
`private/react-native-tests/README.md`). The CI job is advisory
(`continue-on-error`) so a harness issue cannot block merges, and should be
promoted to a required check once consistently green.

## Changelog
[Internal]

## Test Plan
Runs in the new advisory `test_cxx` CI job on this PR (Linux): builds the CMake
harness and runs the gtest suites via CTest.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant