Skip to content

ci: test building against a system uchardet#65

Open
wbarnha wants to merge 1 commit into
claude/mode-pr-81-review-xe6yhefrom
claude/cchardet-ci-system-uchardet
Open

ci: test building against a system uchardet#65
wbarnha wants to merge 1 commit into
claude/mode-pr-81-review-xe6yhefrom
claude/cchardet-ci-system-uchardet

Conversation

@wbarnha

@wbarnha wbarnha commented Jul 24, 2026

Copy link
Copy Markdown
Member

Implements suggestion #2 from the review of #56 (#56 (comment)): CI coverage for the system-uchardet build path, which the existing Tests workflow never exercises (it only builds the bundled default).

Adds .github/workflows/test-system-uchardet.yml — a single Linux job that:

  1. Checks out the repo (submodule included — meson's files() validates the vendored sources exist at configure time even for a system build).
  2. Builds uchardet from git (gitlab.freedesktop.org/uchardet/uchardet) and installs it to /usr.
  3. Confirms the system header exposes uchardet_get_n_candidates (the symbol the enabled/auto probe requires — the last tagged release still reports 0.0.8 but only the git build ships it).
  4. Builds cChardet with pip install . --config-settings=setup-args=-Dsystem-uchardet=enabled.
  5. Asserts via ldd that the extension links the shared libuchardet rather than silently falling back to the bundled sources.
  6. Runs the test suite.

Stacking

This is stacked on #64 (base = claude/mode-pr-81-review-xe6yhe), because the -Dsystem-uchardet=enabled option it exercises doesn't exist on master yet — it's introduced by #64. So the diff here is just the new workflow file. Once #64 merges, GitHub will retarget this to master automatically (or it can be rebased onto master).

Verified locally

I reproduced every step on Linux before writing the workflow: uchardet git built + installed (pkg-config reports 0.0.8, candidate API present), -Dsystem-uchardet=enabled builds against it, ldd shows libuchardet.so.0 => /lib/x86_64-linux-gnu/libuchardet.so.0 (system lib, not bundled), and the suite passes (125 passed, 1 skipped). The workflow's pull_request trigger has no branch filter so it runs on this stacked PR too.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BnTZQEXqpedyrFAgwRnbsA


Generated by Claude Code

The existing Tests workflow only builds the bundled uchardet default, so
the system-uchardet path is never exercised in CI. Add a Linux job that
builds uchardet from git, installs it, then builds cChardet with
-Dsystem-uchardet=enabled and runs the test suite.

The job also asserts (via ldd) that the built extension links the shared
system libuchardet rather than silently falling back to the bundled
sources, and checks that the system header exposes uchardet_get_n_candidates
(the symbol the enabled/auto probe requires).

Stacked on the system-uchardet feature-option change; the option it
exercises does not exist on master yet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BnTZQEXqpedyrFAgwRnbsA
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