Skip to content

Add a CI job covering the CMake integration - #155

Closed
kadircanyildirm-crypto wants to merge 1 commit into
nasa:mainfrom
kadircanyildirm-crypto:feat/cmake-ci-job
Closed

kadircanyildirm-crypto wants to merge 1 commit into
nasa:mainfrom
kadircanyildirm-crypto:feat/cmake-ci-job

Conversation

@kadircanyildirm-crypto

@kadircanyildirm-crypto kadircanyildirm-crypto commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Rebased onto main (2eceda3) on 2026-09-03: actions pinned to the SHAs ci.yml uses since #180; the fixture re-verified against the CMakeLists.txt changes in #189 (native run: add(20, 22) = 42, all 12 C ABI tests passed). Numbers below are from the original branch.

Closes #148. Opening this as a concrete shape for that proposal — happy to reshape or drop it.

Nothing in ci.yml configures crates/spacewasm_c_api/CMakeLists.txt, so the add_subdirectory() integration its README documents is only exercised by hand. tests/c_abi.rs already runs examples/ctest.c and examples/ctest_suite.c, but reaches them through cargo.

This adds a fixture that reaches the same two programs through CMake, and a job that builds them natively and cross-compiles to aarch64. No new test code.

Measured on this branch (Debian bookworm, CMake 3.25.1, 12 cores):

step result time
native add(20, 22) = 42 / all 11 C ABI tests passed (12 on 2eceda3) 19 s
cross aarch64 ELF 64-bit LSB pie executable, ARM aarch64 7 s

Both C programs embed their module bytes, so this is the only job that needs no WABT. Output goes under target/, already gitignored, and the fixture adds no cargo target.

The include(GNUInstallDirs) omission fixed in #130 failed at configure time, so the native step would have caught it. The cross step pins what the README promises — drop SPACEWASM_TARGET and cargo still builds, but emits an x86-64 archive and the link fails with file in wrong format.

Kept aarch64 rather than i686 since test-32bit already covers 32-bit.

Disclosure per AI_POLICY.md: AI-assisted (Claude Code) — fixture, job and this description. I ran every command above; the numbers are from those runs.

@Kronos3 Kronos3 added the Post-v1.0 Issues and features that will not be addressed until after 1.0 Release label Aug 13, 2026
ci.yml has no job that configures crates/spacewasm_c_api/CMakeLists.txt,
so the add_subdirectory() integration its README documents is only
exercised by hand. Add a fixture reaching the existing ctest.c and
ctest_suite.c through CMake, plus a job that builds them natively and
cross-compiles to aarch64.
@kadircanyildirm-crypto

Copy link
Copy Markdown
Contributor Author

Rebased onto main after #180 and #189: the job's actions are pinned to the same SHAs ci.yml now uses, and the fixture was re-verified against the new CMakeLists.txt (native build: add(20, 22) = 42, all 12 C ABI tests passed).

AI use per AI_POLICY.md: Claude Code assisted with the rebase, the verification run and this comment.

@Kronos3

Kronos3 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

See my note on #148

@Kronos3 Kronos3 closed this Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Post-v1.0 Issues and features that will not be addressed until after 1.0 Release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a CI job covering the CMake integration

2 participants