Commit Graph
156 Commits
Author SHA1 Message Date
Dylan M. TayloranddotCooCoo 75d179f8df craft-cdr: move VectorCraft's bounded CDR/CMX reader into craft-libs (#2697)
* craft-cdr: move VectorCraft's bounded CDR/CMX reader into craft-libs (#778)

Moves crates/cdr (vectorcraft-cdr, landed in storytold/vectorcraft#8632)
to craft-libs as craft-cdr: legacy WL (v1-v2), RIFF/cmpr (v3-v13),
ZIP packages and data streams (v14-v27), .cmx (32-bit), provenance
(R1-R63), synthetic test builders, and integration tests.

Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>

* craft-cdr: address CodeRabbit review findings

- Classify all-zero CMX dash patterns once in Tables::read instead of per-curve
- Validate loda offset table length before reserving offsets Vec capacity

---------

Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
2026-11-20 19:12:32 -05:00
dependabot[bot] a20dfd1623 ci(deps): bump actions/checkout (#2582)
Bumps the actions group with 1 update in the / directory: [actions/checkout](https://github.com/actions/checkout).


Updates `actions/checkout` from 4.4.0 to 7.0.1
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4.4.0...v7.0.1)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-20 13:19:17 -05:00
aiongg 7d22ffc36b Merge pull request #2503 from aiongg/ci-test-select
Workspace: pull requests run only the tests their change reaches
2026-11-20 13:01:27 -05:00
aiongg 1819a0868e Workspace: pull requests run only the tests their change reaches
craft-common-actions' select-platforms selects the tests: the crates that
own a changed file, the crates that declare a read of it, and every
crate that depends on them. Every nextest run gets the filter; the build
and the doctests stay whole-workspace. The build setup, a crate's own
Cargo.toml and files outside the crates other than docs run every test;
docs alone run none. pdf, svg and the fonts-build consumer declare the
files of other crates that their tests read.
2026-11-20 17:17:41 +00:00
Dylan M. Taylor 9eb02be84f Merge pull request #2546 from dylanmtaylor/feat/pdf-max-coverage
feat(pdf): enforce max_coverage budget via vendored vello_cpu 0.0.8
2026-11-20 08:27:48 -05:00
aiongg 7a040c1f3b ci: the Workspace gate keeps compiled workspace crates on its Linux leg
The Linux leg restores the newest rolling cache entry of the workspace
crates (cache-workspace-crates), so a pull request rebuilds only the
crates its change reaches. Each main run saves an entry of its own and
cache-prune deletes the older ones; the midnight scheduled run builds from
source and starts the entry afresh.

gate.yml's cache-workspace-crates covers a whole call, so the macOS and
Windows legs move to a call of their own with dependency-only entries. A
select platforms job decides whether that call runs, since an empty leg
list would fail it.

To fit the 10 GB cache budget, the lint legs and the sonarcloud
instrumented build keep no cache.
2026-11-19 16:02:38 +00:00
aiongg e701f54d0a workspace: own cache entries for the WASM and 1.95 calls, stripped test binaries, no examples in the test build
Needs craft-common-actions gate.yml with the cache-name and dev-strip inputs.
2026-11-19 02:22:51 +00:00
David MannandClaude Opus 5.5 1cc156dcc3 ci: skip cargo fmt on the Windows lint leg (#2200)
One rustfmt call with every source root of the workspace is now longer
than a Windows command line may be (os error 206). rustfmt's result is
the same on every system; the Linux and macOS legs keep checking it.
The lint-command guard states the per-system stages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 12:43:50 +01:00
FredApps baa619f016 Merge pull request #2120 from FredApps/ci/full-validation-778
ci: add opt-in uncapped three-platform full validation
2026-11-18 11:06:55 +07:00
FredApps 29ce80e136 ci: register full validation in generated actions lockfile 2026-11-18 01:44:16 +01:00
FredApps 6589b3c83e ci: add opt-in uncapped three-platform full validation 2026-11-17 23:51:18 +01:00
aiongg 019d54bfff ci(jpeg): the uncached wasm check gets a 20-minute limit 2026-11-17 22:07:49 +00:00
aiongg c0421c7fc6 ci: cancel superseded main runs; a scheduled full run saves the caches
Pushes to main cancel the Workspace run they supersede, as pull requests
already do; the newest push's run tests everything before it. On 16 Nov main
had 144 pushes, each a three-OS run that could not be cancelled, which is much
of what fills the org's macOS runners. Release tags, manual runs and a new
scheduled run every 6 hours keep a group of their own and always finish, and the
scheduled run saves the caches (the gate already saves on scheduled runs of the
default branch). scripts/test-workspace-concurrency.py checks the new policy.

The per-crate workflows, which no longer save caches, cancel superseded runs on
every branch, main included.
2026-11-17 19:09:20 +00:00
aiongg a1398a3b61 ci: macOS and Windows legs on a pull request only when it can change them
workspace.yml passes select-os to the gate: a pull request runs the macOS and
Windows legs when a changed file is in a crate with platform cfg code or in a
crate that depends on one, is part of the build setup (workflows, Cargo.lock,
the root Cargo.toml, toolchain, .cargo, .config), or lies outside the crates
and is not documentation. 37 of 177 crates have platform code and 57 are
affected with their dependents; 39 of the last 80 merged pull requests would
have run Linux only, without the macOS queue. The full-ci label runs every leg
from the next push or manual run. Pushes to main run every leg.
2026-11-17 19:09:20 +00:00
aiongg 9bd6416966 ci: clippy and fmt on a lint leg beside each test leg
workspace.yml moves fmt, both clippy runs and the workflow script checks into
the gate's lint-command, so each OS gets a lint (<os>) leg running beside its
gate (<os>) leg. Clippy (about 6 min on Linux and 11 on Windows) no longer runs
before the test build. scripts/test-workspace-tests.py checks both blocks.
2026-11-17 19:09:20 +00:00
aiongg 688c5beba2 ci: cache the PhotoCraft test corpora
The gate restores .test-inputs/photocraft/corpus before its setup, keyed on
scripts/ci-test-inputs.sh (which holds the PhotoCraft pin), and the setup uses a
restored corpus as it is. A hit skips the PhotoCraft checkout and its xtask
build: 2:17 of Windows setup, about 1:00 on Linux and macOS. Uses
craft-common-actions' new cache-paths, cache-key and cache-key-files inputs.
2026-11-17 19:09:20 +00:00
aiongg 899d6e0302 ci: per-crate workflows run only what the Workspace gate does not
The Workspace gate already runs fmt, both clippy runs and the tests of every
crate on Linux, Windows and macOS. The per-crate workflows drop those steps and
keep their own checks: wasm32 builds and tests, no-default and single-feature
clippy and tests, cross-target clippy, docs, release and sample tests,
--ignored tests, ffmpeg oracle tests, the Language-data proofing builds, the PDF
Unicode fixtures, read-only contract and vendored backends. All of them run on
Linux. docpath.yml, print.yml, i18n.yml and ui.yml had no check of their own and
are removed.

They also stop caching dependencies: about 25 rust-cache entries no longer
compete with the gate's for the repository's 10 GB, which the gate's main run
missed on every OS. The data caches (Opus vectors, CRW samples) stay.
2026-11-17 19:09:17 +00:00
aiongg 7aa03b89cc ci: no debuginfo on the Windows leg
CARGO_PROFILE_DEV_DEBUG=0 on Windows, as PhotoCraft's Windows legs do: writing
PDBs for every test binary is a large part of the Windows build. The gate
writes windows-env after its dev-debug default, so the Linux and macOS legs keep
line-tables-only.
2026-11-17 19:09:17 +00:00
aiongg 6af1337860 ci: nextest on every leg, tests with all features once
Every Workspace leg runs nextest with --all-features and the doctests with
cargo test --doc. The default-feature test run is gone: it added exactly four
tests, all in craft-image-codecs and craft-text (feature-off behaviour), so
those two crates run their tests with default features as well. The
default-feature compile stays covered by the first clippy run.

The resource groups from craft-libs#2058's audit move into the ci profile with
platform = 'cfg(unix)', so Linux and macOS share one profile and Windows keeps
the groups it already passes with. No separate example build: nextest builds
examples as cargo test does, and clippy --all-targets checks them.
scripts/test-workspace-tests.py follows the single command set.
2026-11-17 19:09:17 +00:00
aiongg ff502fb75f ci: run a fraction of the fuzz-style tests on pull requests, all of them nightly
craft-testkit's hostile hammer reads CRAFT_HOSTILE_DIVISOR=N: the unmodified
seed, every N-th truncation and 1/N of the rounds. hostile::divisor() gives the
same value to sweeps written without the hammer; craft-image-codecs' TIFF zoo
and malformed-header sweeps use it, with a different offset per input so the
inputs together still reach every position. Proptests without their own case
count read proptest's PROPTEST_CASES.

The Workspace gate and the media, audio, video and PDF workflows set
CRAFT_HOSTILE_DIVISOR=8 and PROPTEST_CASES=64. The longest of these tests
(craft-media's MXF hostile input, 1,310 s on Windows; craft-pdf's crypt
proptests, up to 257 s; the image-codecs sweeps, 140-162 s) drop to about an
eighth or a quarter. nightly.yml runs the whole workspace on Linux without
either variable, so every case still runs once a day.

The gate's test-input setup moves to scripts/ci-test-inputs.sh, shared by both
workflows; it uses a corpus that is already present.
2026-11-17 19:09:17 +00:00
FredApps a97b7948a9 ci: pilot resource-grouped Linux nextest with doctests 2026-11-17 18:58:21 +00:00
FredApps 692a7fe5c9 ci: run the Windows gate's tests with nextest (#1881)
* ci: run the Windows gate's tests with nextest and link with rust-lld

The Windows leg of the Workspace gate takes 55-100 minutes. About half of that is
cargo test running ~370 test binaries one after another, twice (default and all
features), and another 15-17 minutes per feature set is the uncached test build,
where link.exe links every test executable.

- Windows runs the tests with cargo-nextest (parallel across binaries) and the
  doctests with cargo test --doc. The same tests run; .config/nextest.toml puts
  the tests that relied on in-process mutexes (craft-ui GPU, craft-video h264
  fixtures, craft-print) in one-at-a-time groups.
- Windows links with rust-lld via CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER.

Linux and macOS legs are unchanged.

* ci: keep link.exe on the Windows gate

The first run with rust-lld built the tests no faster than link.exe at the same
runner speed (14.4 min against 15.1 min on a runner 8% slower at clippy), so the
linker change is not worth its risk. nextest stays.
2026-11-16 11:45:15 -05:00
FredApps 13d9da9697 Merge remote-tracking branch 'origin/main' into w1670
# Conflicts:
#	.github/workflows/sonarcloud.yml
2026-11-16 06:58:34 +01:00
FredApps a9a9c22994 Merge remote-tracking branch 'origin/main' into w1732
# Conflicts:
#	.github/workflows/sonarcloud.yml
2026-11-16 02:42:43 +01:00
FredApps 815e30d5b6 Merge remote-tracking branch 'origin/main' into w1732
# Conflicts:
#	.github/workflows/sonarcloud.yml
2026-11-16 02:33:07 +01:00
FredApps 41ca1712bf Merge remote-tracking branch 'origin/codex/sunraster-main-reconcile' into w1673
# Conflicts:
#	.github/workflows/sonarcloud.yml
2026-11-16 01:31:27 +01:00
Dylan M. Taylor ae584d3c2f Cover optional JSON-RPC async line transport 2026-11-15 19:16:03 +00:00
Dylan M. Taylor d2f95f488c Include Sun Raster in coverage build 2026-11-15 17:33:21 +00:00
Dylan M. Taylor aec3d5a79b Include optional SGI codec in coverage build 2026-11-15 17:32:46 +00:00
Dylan M. Taylor 34a40314ad Exercise optional AVIF codecs in coverage 2026-11-15 17:31:17 +00:00
skylar taylor-barrick cc7312bf34 ci: cancel superseded Workspace PR runs (#1458)
* ci: cancel superseded Workspace pull-request runs

The Workspace workflow (the native, MSRV and WASM legs) had no concurrency
group, so every push to a lockfile or dependency pull request started a second
full set of runs while the first set kept going, up to three runners each.

Give pull requests one group per pull request, so a newer push cancels the
older run, and give every other run a group of its own, so a main push, a
release tag or a manual run is neither cancelled nor replaced while queued.
github.ref is refs/pull/<n>/merge for a pull request, so two forks with the
same branch name stay separate. The pattern is the one merged in #772 for the
23 crate workflows, which left this reusable-workflow caller out.

The gate commands, jobs, inputs, matrices, timeouts, triggers and permissions
are untouched.

scripts/test-workspace-concurrency.py checks the policy itself: the two fields
and their documented expression shapes, one group per pull request and one per
other run, cancellation on a pull request only, and no job-level concurrency.
It reads the workflow without wiring anything into CI.

* test(workspace-concurrency): reject a scalar concurrency value

`read_concurrency` matched any line starting with `concurrency:` and read the
indented lines under it as fields. Under `concurrency: |` — a block scalar, not
a mapping — the workflow would have passed every policy check with the reader
alone, while the `PyYAML` cross-check that catches it is skipped when PyYAML is
absent. `concurrency: some-string` was rejected only by accident, through the
empty field set.

Require the header itself to be `concurrency:` (an inline comment allowed), and
test both scalar shapes. CodeRabbit found this on the pull request.

* sonar: analyse the Workspace concurrency guard as a test

scripts/test-workspace-concurrency.py is a unittest module: each case reads a
workflow and asserts on the policy. Listing it in sonar.test.inclusions keeps it
analysed as test code — linted, indexed and reported — instead of counting it as
production code that needs coverage, which is what failed the quality gate at
0.0% Coverage on New Code.

The exact path is appended to the three existing Rust patterns, so no other
script, and nothing else in the repository, is reclassified. No coverage
exclusion, quality threshold, workflow or build change.

* ci: run the Workspace concurrency guard in the gate

scripts/test-workspace-concurrency.py guarded the policy only when someone remembered to
run it, so a reworded concurrency block could land with 16 green checks. The gate's
`command` step now runs it before the cargo steps; `command` covers the Linux and macOS
legs, and it is one python3 call that needs nothing installed and fails in a second, ahead
of an hour of building.

The Windows leg keeps its existing `windows-command`: the script passes on a CRLF copy of
the workflow, but this change does not put an untested step on Windows.
2026-11-14 22:34:05 -06:00
Dylan M. Taylor 91949bdebb Refresh moved stable toolchain action pin (#1473) 2026-11-14 20:58:00 -06:00
Dylan M. Taylor ebece3ff5c ci: lock the actions main added while this branch was open
Merging main in brought cms.yml, menu.yml and the wasm job back, and their
action refs had no lockfile entries, so `gh actions-lock --verify` failed.
Regenerated with `gh actions-lock`; the four refs it normalized resolve to
the commits already in use.
2026-11-14 10:05:44 -05:00
Dylan M. Taylor a1c851730a Merge branch 'main' into chore/lock-github-actions 2026-11-14 10:03:13 -05:00
Dylan M. Taylor 840d156fbf Merge current main into image codec extraction 2026-11-14 03:10:53 +00:00
alehelandClaude Opus 5.5 bdf8cb2a19 craft-audio: Opus encoder
EffectCraft's `effectcraft-opusenc` as `opus::encoder` (and
`opus::Encoder`) behind `opus-encode`: SILK, hybrid and CELT, 48 kHz,
20 ms frames, mono or stereo. The constructors and `encode_float`
return `Result` instead of panicking. `Bandwidth` is one type for the
decoder and the encoder, and the two `Mode` enums convert into each
other. `encode` now turns on `opus-encode`.

The encoder tests (modes, ffmpeg's two Opus decoders as oracles) and
`TrackDecoder` on Opus without an `OpusHead` come with it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 21:09:46 -05:00
Dylan M. Taylor 59eccec4ff Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	Cargo.lock
2026-11-13 04:06:48 -05:00
Dylan M. Taylor ca7a73bd2c ci: allow longer Windows workspace gate 2026-11-13 04:50:46 +00:00
Dylan M. Taylor 94e65a4606 ci: run workspace checks with shared gate and test inputs 2026-11-13 03:06:38 +00:00
skylar taylor-barrickandskylartaylor 86ed498b49 Prepare v0.1.0 with release notes, versioning policy and pinned adoption
* Prepare the first coordinated craft-libs release

---------

Co-authored-by: skylartaylor <skylartaylor@users.noreply.github.com>
2026-11-12 10:38:46 -05:00
aionggandaiongg 270db68c1e craft-cms: run the CMS suite in CI
* craft-cms: run the CMS suite in CI; say when system-profile checks are skipped

* craft-cms: satisfy clippy's chunks_exact_to_as_chunks lint in the total-ink test

---------

Co-authored-by: aiongg <aiongtaigi@gmail.com>
2026-11-12 10:38:37 -05:00
Zach Shallbetter b6cbd59671 craft-atomic: eliminate runtime panic on wasm32-unknown-unknown (closes #81)
* craft-atomic: eliminate runtime panic on wasm32-unknown-unknown (closes #81)

---------

Co-authored-by: Zach Shallbetter <zachshallbetter@icloud.com>
2026-11-12 10:38:30 -05:00
aionggandaiongg bcf1e69cf4 craft-window: restore store: window.json beside config.toml and a pure place()
* craft-window: restore store: window.json beside config.toml and a pure place()

* craft-window: restore: review fixes (bar strip, mixed DPI, pending writes, work area)

---------

Co-authored-by: aiongg <aiongtaigi@gmail.com>
2026-11-12 10:37:20 -05:00
aionggandaiongg 5b03af83c8 ci: add a craft-menu workflow
* ci: run craft-menu's fmt, clippy (Linux, macOS and wasm targets) and tests when menu, keymap or quit change

---------

Co-authored-by: aiongg <aiongtaigi@gmail.com>
2026-11-12 10:37:06 -05:00
.CooCoo d426768a06 ci: run Shared PDF for changes under vendor/linesweeper
craft-prepress depends on linesweeper, and #633 adds a copy of it in
vendor/linesweeper and runs its tests from scripts/test-pdf-backends.sh.
Without this path, a pull request that changes only that folder runs
SonarCloud and none of these tests.

---------

Co-authored-by: dotCooCoo <RobertLeeLW@gmail.com>
2026-11-12 10:36:40 -05:00
Dylan M. Taylor 5ba5b82fad ci: verify the actions lockfile in CI
Fails the build when .github/workflows/actions.lock stops matching the
workflows, or when a locked pin no longer verifies upstream, so a stale or
tampered lockfile cannot go unnoticed between dependency updates.
2026-11-12 07:22:55 -05:00
Dylan M. Taylor 75710cfd20 ci: lock workflow actions through an actions.lock lockfile
Mutable action tags are a supply-chain risk: a moved tag runs different code
without a diff. Every workflow action is now pinned through
.github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync
or tampered one fails instead of running.
2026-11-12 07:18:59 -05:00
Dylan M. Taylor e4a6b68e5a ci: lint and test the format crates, and measure the codec features in coverage (#849)
Twelve format crates had no workflow of their own: xml, mime, cfb, mesh,
metafile, dxf, gcode, svg-paths, silhouette-studio, tiff, heif and cms
(cms ran only under the PDF workflow's paths). formats.yml runs fmt,
clippy (default, each feature alone, all features), the tests and a
wasm32 check for each.

The coverage build compiled none of the codec code that sits behind
features that are off by default, so new code in craft-video, craft-audio
and craft-media read as untested and failed the quality gate. The
SonarCloud job now passes those features to the shared workflow.

video.yml's per-feature clippy also covers vp9-decode and vp9-encode.
2026-11-11 18:36:52 -05:00
Dylan M. Taylor 251ef87c89 ci: use StepSecurity's maintained actions (#853)
Each third-party action that StepSecurity publishes a secure drop-in
replacement for now uses that replacement, pinned to a commit with its
version as a comment. Versions follow what we used: the newest
StepSecurity release in the same major, or the closest major they
publish. dtolnay/rust-toolchain refs that named a toolchain (stable,
nightly, 1.76) become the replacement's `toolchain` input.
2026-11-11 14:57:04 -05:00
Dylan M. Taylor ac5f998274 ci: run Harden-Runner on every job (#811)
Adds step-security/harden-runner (audit, pinned to v2.22.4 like
craft-common-actions) as the first step of each job that did not have it,
so every workflow in the org's public repos reports its egress to
StepSecurity. Audit, not block: block-mode allow lists come from each
job's observed traffic.
2026-11-11 12:10:08 -05:00