ci(np): reuse desktop dependencies when building macos bs-harness

Pass `-p affine-desktop` and `--features playground/harness` to build `bs-harness` in the `macos-headless` job. This command reuses the crates from the earlier desktop test step. It stops Cargo from rebuilding shared dependencies with different features.

Also compare `artifacts/macos-run1.json` and `artifacts/macos-run2.json` with `cmp`. This check confirms that both renders write identical snapshot JSON bytes.
This commit is contained in:
DarkSky committed 2026-12-05 06:53:12 +09:00
1 parent f24d4291e7
commit a71e273e4e
1 file changed
+2 -1
+2 -1
View File
@@ -730,7 +730,7 @@ jobs:
if: needs.changes.outputs.desktop-leaf-only != 'true'
run: |
mkdir -p artifacts
cargo build --locked --profile test -p playground --features harness --bin bs-harness
cargo build --locked --profile test -p affine-desktop -p playground --features playground/harness --bin bs-harness
./target/debug/bs-harness render \
--out artifacts/macos-run1.png \
--snapshot artifacts/macos-run1.json \
@@ -748,6 +748,7 @@ jobs:
echo "Run 1 SHA256: $sha1"
echo "Run 2 SHA256: $sha2"
test "$sha1" = "$sha2"
cmp artifacts/macos-run1.json artifacts/macos-run2.json
./target/debug/bs-harness audit --snapshot artifacts/macos-run1.json
- name: Upload macOS headless artifacts