Skip to content

Add a CI job covering the CMake integration - #155

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

Add a CI job covering the CMake integration#155
kadircanyildirm-crypto wants to merge 1 commit into
nasa:mainfrom
kadircanyildirm-crypto:feat/cmake-ci-job

Conversation

@kadircanyildirm-crypto

Copy link
Copy Markdown
Contributor

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 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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a CI job covering the CMake integration

1 participant