forge attest runs .forge/ci in a clean worktree of each commit and signs the result into refs/notes/ci; forge push sends it with the branch. It runs what ci.yml's legs run: scripts/verify-demo-build.sh with every stage, the website gate, and the Decky plugin gate with the pinned pnpm 9.4.0. Cargo's target directory lives in ~/.cache/goq/target, outside the worktree, so runs don't rebuild every dependency from source. target/ in the worktree links to it, because the shell tests read target/debug/sigil directly. forge resets its CI worktree with git clean, which removes the portal-dist/ that src-tauri/build.rs generates while tracked files keep their mtimes, so with a warm target directory cargo would skip that build script and tauri::generate_context! would find no frontendDist. .forge/ci touches portal/runtime-files.txt so the script always runs.
- commit
- 36df5982091d9c182144d24dd590207dc16711ee
- parent
- 69f58398b0d7f3657d82e4c5d7e6e16cce452142
- author
- cat <admin@dev.site>
| A | .forge/ | 27 | +++++++++++++++++++++++++++ |
@@ -0,0 +1,27 @@
1+2+# CI for src.rest: the complete gate (scripts/verify-demo-build.sh), the website3+# gate (scripts/verify-website.sh) and the Decky plugin gate, as ci.yml runs them.4+set -eu5+cache=${XDG_CACHE_HOME:-$HOME/.cache}/goq6+mkdir -p "$cache/target"7+# Cargo's output lives outside the worktree so runs don't rebuild every crate.8+# target/ links to it because scripts/tests read target/debug/sigil directly.9+export CARGO_TARGET_DIR="$cache/target"10+ln -s "$CARGO_TARGET_DIR" target11+# forge resets its CI worktree with git clean, which deletes the portal-dist/12+# that src-tauri/build.rs writes but keeps tracked mtimes, so cargo would13+# think that build script fresh. Touching its input makes it run again.14+touch portal/runtime-files.txt15+./scripts/verify-demo-build.sh16+./scripts/verify-website.sh17+18+# package-decky-plugin.py insists on pnpm 9.4.0, decky/package.json's pin.19+if [ ! -x "$cache/pnpm-9.4.0/node_modules/.bin/pnpm" ]; then20+ npm install --prefix "$cache/pnpm-9.4.0" --no-audit --no-fund pnpm@9.4.021+fi22+PATH="$cache/pnpm-9.4.0/node_modules/.bin:$PATH"23+(cd decky && pnpm install --frozen-lockfile && pnpm test && pnpm typecheck && pnpm build)24+artifacts=$(mktemp -d)25+trap 'rm -rf "$artifacts"' EXIT26+python3 scripts/package-decky-plugin.py "$artifacts/decky"27+python3 -m unittest scripts.tests.test_decky_package -v