Skip to content

C workflow: fix Windows configure + attach installer-named release assets#178

Merged
clemensv merged 1 commit into
masterfrom
fix/c-workflow-windows-cmake
Jul 13, 2026
Merged

C workflow: fix Windows configure + attach installer-named release assets#178
clemensv merged 1 commit into
masterfrom
fix/c-workflow-windows-cmake

Conversation

@clemensv

@clemensv clemensv commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

C workflow: fix Windows configure + attach installer-named release assets

Two c.yml changes, split out of the R SDK PR (#177) so the C CI/release changes can be reviewed on their own.

1. Fix Build and Test (windows-latest) CMake configure failure

The Configure CMake steps run under PowerShell on Windows, which splits unquoted native-command arguments at the decimal point. So the args reached CMake as:

  • -DCMAKE_POLICY_VERSION_MINIMUM=3.5-DCMAKE_POLICY_VERSION_MINIMUM=3 + stray .5
  • -DJSON_STRUCTURE_VERSION=0.1.0-DJSON_STRUCTURE_VERSION=0 + stray .1.0

The current windows-2025-vs2026 runner image ships CMake 4.3, which rejects the truncated policy value "3" (Invalid CMAKE_POLICY_VERSION_MINIMUM value "3"). Bash on Linux/macOS never splits these, so only windows-latest failed. (The version silently truncating to 0 was a latent bug too.)

Fix: quote the -D arguments in all three Configure CMake steps so PowerShell forwards them intact. Verified locally.

2. Attach installer-named release archives

Attach json_structure-<os>-<arch>.tar.gz assets to the GitHub Release so the Ruby and R runtime downloaders can fetch the prebuilt library by a predictable URL. Adds contents: write permission, an asset_basename matrix, and two steps to the tag-only release job.

This second change was previously part of #177; moved here so #177 is a pure R-package PR with no c.yml footprint.

…ssets

Two C-workflow (c.yml) changes, split out of the R SDK PR so the C CI/release
changes can be reviewed on their own:

1. Fix the `Build and Test (windows-latest)` CMake configure failure. The
   Configure CMake steps run under PowerShell, which splits unquoted native
   arguments at the decimal point, so -DCMAKE_POLICY_VERSION_MINIMUM=3.5
   reached CMake as 3 (and -DJSON_STRUCTURE_VERSION=0.1.0 as 0). The current
   windows-2025-vs2026 runner image ships CMake 4.3, which rejects the
   truncated value "3". Quote the -D arguments in all three Configure CMake
   steps so PowerShell forwards them intact. Bash on Linux/macOS was
   unaffected. Also fixes the version being silently set to 0.

2. Attach installer-named release archives (json_structure-<os>-<arch>.tar.gz)
   to the GitHub Release so the Ruby and R runtime downloaders can fetch the
   prebuilt library by a predictable URL. Adds contents:write permission, an
   asset_basename matrix, and two steps to the tag-only release job.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
clemensv added a commit that referenced this pull request Jul 13, 2026
Add an official R SDK (r/) mirroring the Ruby SDK architecture: a thin
compiled shim (src/shim.c) loads the prebuilt json_structure C library at
runtime (downloaded from GitHub Releases on first use, or via
JSONSTRUCTURE_LIB_PATH) and exposes idiomatic R validation functions.

- src/shim.c + init.c: dlopen / LoadLibraryExW dynamic loading, ABI
  re-declared to match c/include headers, columnar .Call result marshaling
- R/: public API (js_validate_schema[_strict], js_validate_instance[_strict],
  is_valid, message and data.frame accessors), lazy library loading, binary
  downloader/cache, and a faithful port of Ruby's extension-keyword checks
- tests/testthat: pure-R, binding, and shared-corpus conformance tests that
  skip gracefully when the native library or assets are absent
- man/: documentation for all exported functions
- .github/workflows/r.yml: multi-OS R CMD check + conformance + release
- README.md, SDK-GUIDELINES.md: document the new SDK

The C release workflow change needed to publish the prebuilt libraries the
R (and Ruby) downloaders consume is handled separately in #178.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@clemensv
clemensv force-pushed the fix/c-workflow-windows-cmake branch from 315098f to bf3cf2c Compare July 13, 2026 10:05
@clemensv clemensv changed the title Fix C workflow windows-latest CMake configure (PowerShell arg splitting) C workflow: fix Windows configure + attach installer-named release assets Jul 13, 2026
@clemensv clemensv mentioned this pull request Jul 13, 2026
@clemensv
clemensv merged commit 3d8b849 into master Jul 13, 2026
5 checks passed
@clemensv
clemensv deleted the fix/c-workflow-windows-cmake branch July 13, 2026 10:37
clemensv added a commit that referenced this pull request Jul 13, 2026
Add an official R SDK (r/) mirroring the Ruby SDK architecture: a thin
compiled shim (src/shim.c) loads the prebuilt json_structure C library at
runtime (downloaded from GitHub Releases on first use, or via
JSONSTRUCTURE_LIB_PATH) and exposes idiomatic R validation functions.

- src/shim.c + init.c: dlopen / LoadLibraryExW dynamic loading, ABI
  re-declared to match c/include headers, columnar .Call result marshaling
- R/: public API (js_validate_schema[_strict], js_validate_instance[_strict],
  is_valid, message and data.frame accessors), lazy library loading, binary
  downloader/cache, and a faithful port of Ruby's extension-keyword checks
- tests/testthat: pure-R, binding, and shared-corpus conformance tests that
  skip gracefully when the native library or assets are absent
- man/: documentation for all exported functions
- .github/workflows/r.yml: multi-OS R CMD check + conformance + release
- README.md, SDK-GUIDELINES.md: document the new SDK

The C release workflow change needed to publish the prebuilt libraries the
R (and Ruby) downloaders consume is handled separately in #178.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant