Commit Graph
231 Commits
Author SHA1 Message Date
aiongg 519a0c22a3 Engine split step 3: top crate with the wrapper Session
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).

The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.

Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.

Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.

Part of #15710
2026-11-22 19:29:06 +00:00
aiongg 3e05a3747b Merge remote-tracking branch 'upstream/main' into HEAD
# Conflicts:
#	.github/workflows/ci.yml
2026-11-22 15:29:46 +00:00
Dylan M. Taylor fc3cc747e9 ci: use artcraft-k8s-main runner on main (#16407) 2026-11-22 09:33:44 -05:00
aiongg 44ac69dede Merge upstream/main into ci-pin-toolchain; gate runs when platforms fails, cold cache clear keeps newer entries, panic_hunt timeout 2026-11-22 05:59:39 +00:00
Dylan M. Taylorandaiongg e084cb8552 ci: use artcraft-k8s-trusted runner on main (#16368)
* ci: use artcraft-k8s-trusted runner on main

* ci: sccache on main runs, which use the shared cluster cache on the trusted runners

---------

Co-authored-by: aiongg <aiongtaigi@gmail.com>
2026-11-22 00:03:23 -05:00
FredAppsandFredApps c0771fe72b Build the CI archive driver without framework-only lint dependencies (#15963)
* Use the document mutator in the damage-history fixture

* Compile the archive driver without framework-only lint dependencies

---------

Co-authored-by: FredApps <FredApps@users.noreply.github.com>
2026-11-21 00:07:08 +07:00
aiongg 5351576daf tests: the corpus tests take a fixed sample per directory; the nightly run sweeps every file
The real-file corpus tests the Linux gate runs took up to 394 s each (the psd-tools mutation
sweep), 780 test-s together. Each now walks a fixed sample chosen for coverage (photocraft-testkit
`corpus`: every colour mode and depth, PSD and PSB, the block kinds outside the large files, each
oracle kind, smart objects, vector blocks, type) and stays under a second. PHOTOCRAFT_FULL_SWEEP=1,
the switch the testkit sweeps already read, takes every file; the nightly run sets it.

- Oracles keep floors for the sample next to the full floors.
- The mutation sweep cuts and corrupts each sampled file 12 times instead of 31.
- The layered TIFF test takes the psd-tools sample.
- The smart-object test imports only files with a placed-layer block (full sweep: 32 s to 5 s).
- The blend-mode tests import once and render only the compared cells.
- The 16.8 MP spot-channel file runs in full sweeps only; the generated files check the same reading.
- The #1606 special-shapes test is the affinity table's row for that file plus its warning check.

Part of #15711
2026-11-20 07:23:46 +00:00
aiongg ff61830706 ci: rust-channel at its merged commit; the corpus job goes
The gate's shards run the corpus tests.

Part of #15711
2026-11-20 04:35:07 +00:00
aiongg a794786de0 Revert "[trial] rust-channel from the aiongg branch of craft-common-actions#302"
This reverts commit 31fdd41262.
2026-11-20 04:35:01 +00:00
aiongg 3dd74f6bdb ci: the nightly run warns about a newer Rust release instead of opening a pull request
Part of #15711
2026-11-20 04:21:51 +00:00
aiongg f08d65ac69 ci: the Linux gate builds the real-file corpus tests in and its shards fetch the corpora
Part of #15711
2026-11-20 04:16:53 +00:00
aiongg d5e182a725 ci: a pull request's Linux gate tests only the packages its changes reach
Part of #15711
2026-11-20 04:15:47 +00:00
aiongg c03a989f5a ci: the nightly cold run deletes the old rolling crates entries before it saves its own
Part of #15711
2026-11-20 04:15:10 +00:00
aiongg 31fdd41262 [trial] rust-channel from the aiongg branch of craft-common-actions#302 2026-11-20 04:14:10 +00:00
aiongg 5612b2dfd4 ci: pin the toolchain in rust-toolchain.toml
The file is the one source: the jobs install what it names through
craft-common-actions' rust-channel action, and the nightly run opens a pull
request that changes only the file when a newer stable exists.

Part of #15711
2026-11-20 04:14:10 +00:00
aiongg 629c0ffb75 ci: build every CI job with one pinned Rust release
Part of #15711
2026-11-20 04:02:11 +00:00
aiongg 4d91c2ec04 Merge pull request #15826 from aiongg/ci-shard-archives
CI: one test archive per shard, balanced by recorded test times
2026-11-19 20:03:50 -05:00
aiongg 7a2dbc9b6f Merge pull request #15828 from aiongg/ci-cache-budget
CI: keep the Actions cache within its budget (trim saved entries, prune replaced ones as they land)
2026-11-19 19:50:16 -05:00
aiongg 0b09cee9f9 ci: prune each replaced cache entry as soon as its successor is saved
cache-prune replaces gate-cache-prune. It starts with the run (the gate is one reusable call, so
needs: gate waited for every shard) and runs craft-common-actions' cache-prune action in watch
mode: each time the gate's build jobs, web or corpus finish, it deletes the entries their new
entries replace (the older rolling crates entry, and lockfile- or manifest-keyed entries nothing
used since), and it ends when none of those jobs is queued or running.
2026-11-19 22:20:51 +00:00
aiongg aac8e37bec CI: one test archive per shard, balanced by recorded test times
The gate's build job writes one nextest archive per shard (craft-common-actions gate.yml
shard-archives), so each shard downloads only the test binaries it runs instead of the whole
2.4-2.6 GB archive.

`cargo xtask ci archive` builds and lists the tests once, then plans the shards
(xtask/src/shards.rs): whole binaries go to the lightest shard, heaviest first, by the times in
.config/ci-test-times.tsv; a binary heavier than half a shard's share is split by test filter along
its module tree, and its executable goes into each archive that runs part of it. On Linux shard 1
takes every binary with gpu-group tests. The build checks that every test runs on exactly one shard,
writes the plan into the target directory, which every archive carries, and archives each shard
with `cargo nextest archive -E`. A shard runs `xtask ci tests --shard <k>` with its part of the
plan; the slice partition is gone.

scripts/ci-test-times.py refreshes the times file from a CI run's shard logs; a missing or stale
row only costs balance.
2026-11-19 20:47:26 +00:00
aiongg 8ca6d3c767 web CI: skip wasm-opt --converge on pull requests 2026-11-19 20:19:35 +00:00
aiongg aeeebb8e78 ci: shared workflows and actions from storytold/craft-common-actions main 2026-11-19 14:19:10 +00:00
aiongg 57847bd8bd ci: restore gate-cache-prune as a job of this workflow; lint legs keep no cache 2026-11-19 14:05:14 +00:00
aiongg 0057b98577 ci: cache budget: no lint or coverage-build caches, the rolling entry pruned right after the build 2026-11-19 13:58:15 +00:00
aiongg 8ff1a1862e ci: the cache prune lists main's entries only 2026-11-19 09:30:58 +00:00
aiongg c9746558d7 ci: build the tests once per OS, keep compiled workspace crates, balance the shards
- Both gate calls build the tests once into a nextest archive (cargo xtask ci archive); the
  shards run it, and the build job runs the doctests after the upload.
- The Linux gate keeps the compiled workspace crates in a rolling cache entry
  (cache-workspace-crates). A nightly cold build is its safety net; gate-cache-prune keeps the
  newest entry. test (without heif) restores that entry.
- The shards split the tests with nextest's slice partition, which spreads the slow modules:
  on one main run's times the non-GPU shards go from 728/493/523 s (hash) to about 602/506/625 s.

Fixes #15702
2026-11-19 08:06:05 +00:00
aiongg ec40c48cc2 ci: build the tests once per OS and run the shards from a nextest archive 2026-11-19 06:34:17 +00:00
aiongg 0052ec5ce9 ci: strip test binaries and build the craft framework at opt-level 0 in test builds 2026-11-19 02:20:03 +00:00
aiongg 2a83631d46 CI: the GPU shard runs the whole gpu group, perf jobs share one cache entry, CI-only changes run Windows 2026-11-18 20:19:02 +00:00
aiongg eee31b0d11 CI: shards build their own tests instead of running from an archive
The gate's archive of ~98 test binaries would be 10-18 GB compressed, so
every shard restores the dependency cache, builds the tests and runs its
partition (scripts/ci-test-shard.sh). `cargo xtask ci tests` runs the test
steps on $NEXTEST_PARTITION, `ci build` builds exactly what a shard builds
(main's cache warm-up), and `ci doctest` runs in one shard. The `ci archive`
part, the archive's xtask binary and the extraction are gone.

The Linux GPU shard keeps the gpu group alone on lavapipe; shards 2-4 split
the rest. Windows uses six shards: ~55 min of tests on one runner, and its
slowest test alone takes ~9.6 min, so a seventh would not shorten the
slowest shard.
2026-11-18 19:09:59 +00:00
aiongg 0e3523cdcd CI: shard the Linux and Windows tests, lint leg, xtask environment fix, rust-cache v2.9.3
- xtask starts every cargo without the variables `cargo run` sets for xtask
  (CARGO_MANIFEST_DIR, CARGO_PKG_*, ...), so a build script that declares
  `rerun-if-env-changed` for them (ring) no longer reruns, with the whole
  craft facade above it, between builds inside and outside xtask.
- `cargo xtask ci` splits into the gate's parts without a second step list:
  `lint` (fmt, egui-fork, clippy, layers, panel-commands, scorecard, wasm,
  i18n report), `archive` (test build into the nextest archive, doctests),
  `tests --from <dir>` (test and panic_hunt from the extracted archive, on
  $NEXTEST_PARTITION; --gpu / --no-gpu select by the gpu test group) and
  `build` (cache warm-up). Plain `cargo xtask ci` still runs every step.
  PHOTOCRAFT_CI_EXCLUDE leaves packages out of the test build and doctests.
- The `ci` nextest profile's archive carries the xtask binary, so a shard
  builds nothing (scripts/ci-test-shard.sh).
- Linux gate: lint leg, one build, four shards. Shard 1 runs the gpu group
  alone on lavapipe and checks its output (scripts/ci-gpu-lavapipe.py now
  wraps that run); the second GPU run and its rebuild are gone.
- Windows unit, integration, clippy and warm legs move onto the shared gate
  (Windows runner, lint leg for Clippy, four shards), keeping the PR
  selection from the platforms job, rust-lld, /OPT:NOICF, /DEBUG:NONE and
  the D:\t target dir.
- The slowest-tests-first priorities apply on Linux too.
- Swatinem/rust-cache v2.9.3 by commit for this repository's own cache
  steps, with fresh keys; cache-version v2 for the gate and docs entries.
  `test (without heif)` restores the gate's entry through the shared action.
  Dispatch-only jobs no longer save caches no pull request reads; the quick
  perf suite restores perf-nightly's entry.
- windows_delay_loads reads the app from NEXTEST_BIN_EXE_photocraft, as the
  other app tests do, since archives relocate binaries.
2026-11-18 19:04:43 +00:00
aiongg 735546b11e CI: Windows rust-cache saves again (use v2.9.1) 2026-11-18 17:00:11 +00:00
aiongg 4d5d0ecc97 ci(freebsd): run nightly and on demand only
FreeBSD no longer runs on pull requests or release pushes, so it never blocks a merge or a release.
2026-11-18 15:00:51 +00:00
aiongg 973f310aaa ci(windows): on pull requests skip the tests of platform-neutral packages the change does not reach 2026-11-18 14:56:22 +00:00
aiongg 45e01a84c7 ci: save the dependency caches from build-only warm legs on main 2026-11-18 14:55:44 +00:00
aiongg 5ccb62f44e ci(windows): skip the wasm apps' native tests 2026-11-18 14:52:57 +00:00
aiongg fea993e30c ci(windows): drop the dependency layering check, which the Linux gate runs 2026-11-18 14:52:50 +00:00
aiongg f49a6684f8 ci(windows): run Clippy in its own parallel leg 2026-11-18 14:52:46 +00:00
aiongg 33e41a6539 ci(windows): upload cargo build timings from the test legs 2026-11-18 14:52:38 +00:00
aiongg 39e85bffcb ci(windows): link the test binaries with rust-lld, without ICF or PDBs 2026-11-18 14:52:31 +00:00
aiongg 8bc1e51260 Merge storytold main into main-gate-fixes 2026-11-18 11:06:37 +00:00
FredApps 7c5d0bc6ea Merge pull request #9750 from 1Git2Clone/ci/ast-grep-cli
ci(cli): check the command-line code with ast-grep rules (RFC-0012)
2026-11-18 16:28:06 +07:00
FredApps afff03ebc7 Merge pull request #9860 from dotCooCoo/fix/manual-fuzz-nightly
Select nightly explicitly for the manual fuzz job
2026-11-18 16:21:14 +07:00
aiongg d6d93ace07 CI: craft-fonts cc9269cd8, which has Noto Sans Tamil for the Tamil language name 2026-11-17 21:04:35 +00:00
David Mann 4fe336a8c5 Merge pull request #15248 from davidmann4/ci/windows-gpu-tests-when-related
ci: run the Windows GPU tests only when their inputs change (#15247)
2026-11-17 16:48:42 +01:00
David Mann 2b170887fa Merge pull request #15234 from davidmann4/ci/windows-rust-cache-target
ci: let the Windows rust-cache find the short target directory (#15232)
2026-11-17 16:48:17 +01:00
FredApps 01b79958a7 ci(freebsd): build every target with the test profile so ui-egui's tests fit the VM (#15360)
* ci(freebsd): build with two cargo jobs so the aarch64 cross build fits the VM

The nightly aarch64 leg (a cold cross build of every target in the shared workflow's 12 GB
FreeBSD guest, CARGO_BUILD_JOBS=4) was killed with exit 137 twenty minutes into ui-egui's
targets, while photocraft-web compiled alongside them (run 43936108201). The same cold build
passed on 15 Nov, so it is at the edge of the guest's memory.

Pass `--jobs 2` through the existing cargo-build-extra-args input. It applies to the build step
of both legs; the x86_64 test commands keep the shared four jobs.

* ci(freebsd): build with the test profile, not two jobs

Two jobs didn't fix it: the x86_64 leg of the dispatched run was SIGKILLed the same way at
--jobs 2 (run 43963415772). The killed rustc was ui-egui's lib test target at -C opt-level=1:
`cargo build --all-targets` builds test targets with the dev profile, so Cargo.toml's
`[profile.test.package.photocraft-ui-egui] opt-level = 0` never applied to the build step. That
one optimised rustc over about 390k lines and 7700 tests ran the 12 GB guest out of memory, and
`cargo test` then rebuilt the same target at opt-level 0 (1m47s on x86_64) anyway.

Pass `--profile test` instead, so the build compiles every target as the tests do: ui-egui at
opt-level 0, debuginfo still off through CARGO_PROFILE_DEV_DEBUG=0 (test inherits dev), and the
test commands reuse the build's artifacts.

* ci(freebsd): test ui-egui with the build's package selection

`cargo test -p photocraft-ui-egui` resolves dependency features without the
other workspace members, so egui, epaint and everything above them got new
hashes. The test step then rebuilt ui-egui's lib tests instead of reusing
the build step's, and that rustc was SIGKILLed in the 12 GB guest.

Run ui-egui's lib, doc and integration tests through
`--workspace --features heif --exclude photocraft-gpu`, which resolves the
same units as the build (checked with cargo's unit graph: 0 units missing
from the build, against 146 for `-p photocraft-ui-egui --lib`). The
integration tests share one command, so all of them run one at a time.
2026-11-17 05:28:19 +01:00
David MannandClaude Opus 5.5 0ad38ecc19 Address CodeRabbit review: any package manifest runs the Windows GPU tests
A feature enabled in another member's Cargo.toml unifies into the workspace build the GPU tests
run in, and Cargo.lock does not record features, so a manifest-only change outside the GPU inputs
now selects the tests too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 00:53:09 +01:00
David Mann 322d0309ae ci: count both sides of a move in the Windows GPU test selection (#15247)
git diff names only a rename's destination, so moving a file out of
photocraft-gpu looked like a change in the package it moved to. Also
group the platforms job's output lines (actionlint SC2129).
2026-11-16 00:06:01 +01:00
David Mann 18ca46a3d6 ci: stop when the Windows cache target path cannot be computed (#15232)
An empty path made rust-cache treat the checkout as its target
directory.
2026-11-16 00:05:21 +01:00