Skip to content

test: cover CMake subdirectory consumers - #4822

Open
Hrushikesh-ramilla wants to merge 1 commit into
facebook:devfrom
Hrushikesh-ramilla:test/cmake-subdirectory-consumers
Open

Hrushikesh-ramilla wants to merge 1 commit into
facebook:devfrom
Hrushikesh-ramilla:test/cmake-subdirectory-consumers

Conversation

@Hrushikesh-ramilla

Copy link
Copy Markdown

Summary

Add the CMake consumer regression coverage requested in #3758. The target header interfaces are already present; this change protects them with a separate parent project that links libzstd_static and libzstd_shared without manually supplying include paths.

Both C++98 consumers include zstd.h, zstd_errors.h, and zdict.h, compress and decompress a buffer, and verify the round trip. The existing Linux, macOS, and Windows paths-with-spaces jobs configure, build, and run the consumers. On Windows, the shared consumer receives its DLL next to the executable.

A separate CI repair commit fixes two setup failures encountered during fork validation:

  • Request platform-tools explicitly from the pinned Android setup action, avoiding the removed tools package. The existing NDK installation and builds remain in place.
  • Select Visual Studio 2026 for the native Windows ARM64 runner, matching its installed image. The other Windows matrix entries retain their existing generators.

Relates to #3758 and #2377.

Validation

  • MSVC 19.42 x64, Windows SDK 10.0.22621, CMake 3.30.6: both consumers build with warnings treated as errors and pass CTest.
  • Temporarily removing the static and shared target include interfaces makes both consumers fail with a missing zstd.h; restoring the interfaces makes both pass again.
  • MSVC /analyze passes for both consumer programs.
  • License headers and git diff --check pass.
  • Full GitHub Actions validation at c9e787b: all 104 check jobs pass across all five workflows (commit, short tests, long tests, CMake, and Android NDK).
  • Fork validation: test: cover CMake subdirectory consumers Hrushikesh-ramilla/zstd#1

AI assistance: Codex assisted with the regression fixture, workflow changes, and validation.

@Hrushikesh-ramilla
Hrushikesh-ramilla force-pushed the test/cmake-subdirectory-consumers branch from c9e787b to 89c0ac5 Compare October 9, 2026 21:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant