Skip to content

ci: enforce C17, Rust lint gates, and workflow hardening - #108

Merged
Xuanwo merged 5 commits into
mainfrom
xuanwo/strict-c17-ci-checks
Nov 21, 2026
Merged

Xuanwo merged 5 commits into
mainfrom
xuanwo/strict-c17-ci-checks

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Nov 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add a minimal pure-C consumer for include/lancedb.h and build it as strict C17. GCC/Clang use -std=c17 -Wall -Wextra -Werror -pedantic; MSVC uses /std:c17 plus /W4 /WX.
  • Run the consumer through the named CTest test and a distinct check-c17 target. check-c17 calls CTest with --no-tests=error, keeps the coverage environment, and selects the configuration for multi-config generators.
  • Keep the C17 test available when a platform job enables only the standalone consumer test. Use the MSVC lancedb.dll.lib import library and put the Rust target directory on the test PATH, without adding a second DLL staging step.
  • Change the Rust lint gate to cargo fmt --check and cargo clippy --all-targets -- -D warnings.
  • Add contents: read to ci.yml, use PR-only cancellation, and give each push its own concurrency group so pending main runs are not replaced. coverage.yml likewise isolates push runs, keeps actions: read for the main baseline artifact flow, and preserves the exact merge-base lookup and threshold.
  • Add .github/dependabot.yml for GitHub Actions versions.
  • Drop the macos-15-intel package matrix entry because Intel macOS is no longer supported. The standalone packaging/CI change will carry the rest of that workflow delta.

No public header or Rust ABI changes are included.

Validation

  • cargo fmt --check
  • cargo clippy --all-targets -- -D warnings
  • Built the branch library with cargo build, then compiled and ran tests/c17_consumer.c with both GCC and Clang using -std=c17 -Wall -Wextra -Werror -pedantic: C17 consumer: OK.
  • Ran the named C17 CTest test on Linux: ctest -R '^lancedb_c17_consumer$' --no-tests=error passed.
  • Configured CMake for BUILD_TESTS=ON, BUILD_CONSUMER_TEST=ON, and Ninja Multi-Config; verified the compile flags, CTest command, -C selection, and failing status propagation.
  • Generated a Windows/MSVC-like Ninja graph with clang-cl to verify the lancedb.dll.lib import path, path_list_prepend test environment, and the Windows C17 target.
  • Ran the package fixture tests and actionlint; both passed.
  • Parsed all changed workflow and Dependabot YAML files.

Full GitHub Actions results will be reported on the PR.

Closes #96

Build and run a minimal pure-C consumer with C17 warnings as errors through CMake and CTest, and expose a check-c17 target for platform CI. Update the check target to lint all Rust targets with warnings denied. Add read-only workflow permissions and PR concurrency while preserving the main coverage baseline, and add Dependabot for GitHub Actions.
Intel macOS is no longer a supported target, so do not launch macos-15-intel from this PR workflow.
Keep the strict C17 header check available when a platform CI job enables only the standalone consumer test, so native Windows CI can run it without the Catch2 suite.
Give each push its own concurrency group so pending main runs are not replaced; PRs keep per-ref cancellation. Use the MSVC import-library name, put the Rust target directory on the Windows test PATH, and invoke the named C17 test through CTest with multi-config selection and --no-tests=error.
@Xuanwo
Xuanwo merged commit 391dca3 into main Nov 21, 2026
14 checks passed
Xuanwo added a commit that referenced this pull request Nov 21, 2026
Integrate #108 strict C17 checks and workflow hardening alongside the native Windows C and C++ consumer build. Keep one test PATH mechanism based on RUST_TARGET_DIR, the MSVC lancedb.dll.lib import path, five release-tag/dispatch package targets, and #91 exact tag provenance.
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.

ci: add C17 header check, Rust lint gates, and workflow hardening

1 participant