Enable testing of C and C++ on ARM

Open
#269 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
cmake, cpp, github-actions
Domain
ci-cd, testing

Research direction

Start with the C/C++ CI matrix and verification/CMakePresetsVendorTemplate.json; compare it with the generated verification/CMakePresets.json and the existing native workflow configurations. Check how the toolshed image and ARM64 runner or emulation are selected, then verify that both C and C++ suites run on ARM64 and that empty test selection fails the job. Done means CI logs show passing test counts for both languages and the contributor documentation explains how to run those configurations locally.

Written by the indexing model from the issue text.

Description

build and test

Run the generated C and C++ unit tests on ARM in CI. The original proposal suggested emulated Raspberry Pis; a native Linux/ARM64 CI job can satisfy the execution requirement.

What has landed

PR #406, merged as 9b6ba6025a7230c8cb89a58e91fc72d448a2be63, fixed the prerequisite: C/C++ verification workflow presets now run CTest after each build. Previously, most matrix configurations compiled their tests without executing them.

The change updated verification/CMakePresetsVendorTemplate.json and regenerated verification/CMakePresets.json. Native workflows now follow configure → build → test for their selected configurations.

PR #406 reports successful local runs in toolshed:ts24.4.3 on Linux/ARM64 for:

  • workflow-gcc-native-c-11
  • workflow-gcc-native-cpp-17-pmr
  • workflow-clang-native-cpp-20, including DebugCov

These runs establish that the existing native test workflows can run on ARM64. They do not provide recurring ARM64 coverage in CI.

What is still missing

As checked on main at ed853f93c853a832b9c6b85179923c7bf3f1e21c:

  • The C/C++ CI matrix still runs on ubuntu-latest with native32, native, and arm-none-eabi configurations. There is no ARM64 runner or emulation job.
  • arm-none-eabi is a bare-metal cross-compilation check. It builds the minimal test_armv7m executable rather than the normal unit suites and registers no CTest tests.
  • Although the bare-metal workflows now invoke CTest, “No tests were found” currently passes. That does not satisfy this issue's requirement to execute C/C++ tests on ARM.
Remaining work
  • Add a Linux/ARM64 CI job using a native ARM64 runner or explicitly configured ARM64 emulation. Verify the compiler, container, and test executables actually target/run ARM64.
  • Use the existing native C/C++ verification workflows on that ARM64 environment. Cover both languages, document the selected GCC/Clang and language-standard configurations, and execute their configured build/test steps.
  • Verify that the CI toolshed image and required compilers/tools are available for ARM64. The current C/C++ CI image is ghcr.io/opencyphal/toolshed:ts26.4.5.
  • Make every test invocation used by the ARM64 job fail when no tests are discovered or selected. For workflow-driven testing, set execution.noTestsAction to "error" in the relevant test presets; for direct CTest calls, use --no-tests=error.
  • Put generated-preset changes in verification/CMakePresetsVendorTemplate.json and regenerate verification/CMakePresets.json. Scope the empty-test failure policy to runnable verification configurations; keep intentionally compile-only bare-metal checks separate.
  • Validate the negative case: select no tests or use an empty test directory, and confirm a nonzero status propagates to failure of the ARM64 job.
  • Confirm the ARM64 CI logs show nonzero test counts and passing C and C++ suites, and update the contributor documentation with how to run the job's configurations locally.

CTest documents --no-tests=error and the equivalent test-preset execution setting.

Close this issue once the ARM64 CI job is merged and passes with real C/C++ test execution, including verified failure when no tests are found.

Dominant language
Python
Stars
48
Forks
26
Avg merge
1d 18h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenCyphal/nunavut

All issues in OpenCyphal/nunavut

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.