Repository navigation
ci: Restore full CI job set for the standalone repo - #308
Merged
Merged
Conversation
This was referenced Sep 9, 2026
scouten-adobe
force-pushed
the
restore-full-ci
branch
from
September 9, 2026 19:53
97805a1 to
6dc967c
Compare
Migration only carried a tests-cli slice. Restores everything from c2pa-rs's tier-1a.yml/beta-preflight.yml that still applies to a single binary crate with no workspace and no backend-feature matrix: - tests-cli, doc-tests, cargo-check, cargo-lock, clippy_check, cargo_fmt, cargo-deny, tests-wasi -- all adapted to drop the get-features job and its $FEATURES matrix (c2patool's own Cargo.toml hardcodes its c2pa backend feature already; it never selected one dynamically) and any --workspace flag (none survive in a single-crate repo). - New docs-private job: cargo doc --document-private-items --no-deps, warnings denied. c2patool doesn't publish to docs.rs (binary, no public API), so docs_rs/docs_stable don't apply, but internal documentation (including private items) still needs to build cleanly. Dropped entirely: get-features, tests-openssl, tests-rust-native-crypto, tests-windows-arm-*, docs_rs, docs_stable, tests-wasm, tests-cross -- all either SDK-only backend-matrix concerns or docs.rs-publish concerns that don't apply to a binary crate. NOTE: main's Cargo.toml currently depends on an unpublished c2pa version (0.91.0-dev), so this CI cannot actually pass until that's fixed (see the companion 'auto-track c2pa-rs main' PR).
Actions has been off since the cutover, so none of this had ever actually executed until now: - deny.toml: add contentauth/c2pa-rs to allow-git. main's own c2pa git dependency (#309) is intentional, but cargo-deny's sources check denies unrecognized git sources by default. - src/main.rs: fix a stale test-fixture path (../../cli/tests/... -> ../tests/...) left over from the pre-flattening workspace layout. Broke both cargo test and clippy --all-targets (which compiles tests). - Cargo.toml: split the c2pa dependency by target. It hardcoded the openssl backend feature unconditionally, which can't compile for wasm32 (c2pa-rs's own openssl dependency is itself gated to not(target_arch = "wasm32")) -- the wasi target needs rust_native_crypto instead. Needed 'resolver = "3"' too: edition 2018 defaults to resolver 1, which unifies a dependency's features across ALL targets in one pass instead of resolving per-target, so both backends were getting enabled simultaneously and colliding. - ci.yml / beta-preflight.yml: drop the doc-tests job entirely -- c2patool has no library target, so 'cargo test --doc' has nothing to test and errors outright ('no library targets found'). The docs-private job (cargo doc --document-private-items) is the meaningful internal-docs check for a binary crate; doc-tests never applied here. All four verified locally: cargo test --bins (14 passed), clippy --all-targets, cargo deny check (all ok), and cargo +nightly-2026-01-16 test --target wasm32-wasip2 --no-run (compiles clean).
scouten-adobe
force-pushed
the
restore-full-ci
branch
from
September 9, 2026 20:08
6dc967c to
88a3b79
Compare
std::process::id() panics under WASI (no process-ID concept in that sandbox) rather than erroring, which crashed the whole test binary (SIGABRT) the moment atomic_write_file_writes_and_replaces ran under tests-wasi. Switched to a nanosecond timestamp instead -- verified locally against the actual wasm32-wasip2 target with wasmtime, all 13 unit tests + 0 integration tests pass.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #308 +/- ##
===========================================
+ Coverage 44.20% 72.16% +27.96%
===========================================
Files 5 4 -1
Lines 828 1060 +232
===========================================
+ Hits 366 765 +399
+ Misses 462 295 -167 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
cargo llvm-cov --bins alone only measures the crate's own embedded unit tests -- it excludes tests/integration.rs (38 tests) entirely, since that's a separate [[test]] target, not a bin target. That was masking most of the actual coverage: --bins alone reports 32%, matching what was seen in the new repo; adding --tests brings it to 68-71% locally, in line with the historical c2pa-rs figure for this code. This flag scope already existed as-is in c2pa-rs's own tier-1a.yml tests-cli job (not something the migration or this PR's restore introduced) -- it just never surfaced as a problem there, likely because Codecov's per-file report aggregates uploads from multiple c2pa-rs CI jobs, only one of which is this narrowly-scoped one.
scouten-adobe
marked this pull request as ready for review
September 9, 2026 22:11
c2patool ships a Mac/Linux/Windows binary as its core product and has real per-OS code (the cfg(windows) windows-sys dependency), unlike the SDK crate this repo split from -- there, cross-platform testing is a separate, more expensive Tier 1B/2 concern deliberately kept out of the fast per-PR gate (Tier 1A/ci.yml stays ubuntu-only there). That trade-off doesn't apply here: there's no other tier picking up cross-platform coverage for c2patool, so it needs to be in the direct gate. Coverage collection/Codecov upload stays ubuntu-only to avoid three redundant uploads for the same run. Verified locally on macOS: cargo test --bins --tests, 38 passed.
Adds rust-version = "1.88.0" to Cargo.toml -- an explicit, cargo- enforced claim, not just documentation -- and extends the Unit tests matrix with rust_version: [stable, 1.88.0] alongside the existing OS matrix (6 combinations total), matching how c2pa-rs's own tier-1b.yml combines os + rust_version for its MSRV coverage. Coverage/Codecov upload stays scoped to just the ubuntu+stable leg. Found and fixed a real MSRV violation surfacing this: c2patool's own resolved Cargo.lock pulled in aes 0.9.3 (transitively via lopdf, via c2pa's "pdf" feature), which requires rustc 1.89 -- one version past what's claimed. Pinned to 0.9.1 (0.9.0 is yanked; 0.8.x doesn't satisfy lopdf's own aes requirement). Verified locally: cargo +1.88.0 check and cargo +1.88.0 test --bins --tests both pass clean (38 tests), as does the regular stable build.
scouten-adobe
enabled auto-merge (squash)
September 9, 2026 22:39
scouten-adobe
disabled auto-merge
September 9, 2026 22:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restores the CI jobs dropped during the repo split (which only carried a
tests-clislice), adapted for a single binary crate with no workspace and no backend-feature matrix. See the commit message for the full kept/dropped/new breakdown. Adds one new job not present in c2pa-rs:docs-private(cargo doc --document-private-items, warnings denied) -- c2patool doesn't publish to docs.rs, but internal docs should still build cleanly.Depends on the 'auto-track c2pa-rs main' PR --
main'sCargo.tomlcurrently depends on an unpublishedc2paversion (0.91.0-dev), so none of this CI can actually run green until that's merged too.Part of restoring c2patool's post-cutover release infrastructure.