GeezerVison is showing github.com — ci(release): desktop builds that cannot open no longer publish (#25928) · pingdotgg/t3code@f41518f
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/release-desktop.yml +38Lines changed: 38 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 64 | 64 | required: false | 65 | 65 | default: false | 66 | 66 | type: boolean | | 67 | + # Whether the job opens the packaged app against a seeded database and | | 68 | + # opens a thread before uploading it. Linux AppImage or macOS DMG. | | 69 | + launch_check: | | 70 | + required: false | | 71 | + default: false | | 72 | + type: boolean | 67 | 73 | # A runner of the target's own platform and architecture, for a `runner` | 68 | 74 | # that cannot execute the target. The build job skips everything that | 69 | 75 | # runs the packaged binaries, and a second job runs it there. | @@ -517,6 +523,38 @@ jobs: | 517 | 523 |
| 518 | 524 | vp run dist:desktop:artifact "${args[@]}" | 519 | 525 |
| | 526 | + # A build can package fine and still not open (a missing module in the | | 527 | + # backend or the bundle). This launches the app from the shipped | | 528 | + # AppImage or DMG. | | 529 | + - name: Launch check | | 530 | + if: inputs.launch_check | | 531 | + shell: bash | | 532 | + run: | | | 533 | + set -euo pipefail | | 534 | + check=(node scripts/smoke-desktop-app.ts --artifacts-dir "$RUNNER_TEMP/desktop-launch-check") | | 535 | + if [[ "${{ inputs.platform }}" == "mac" ]]; then | | 536 | + mount="$RUNNER_TEMP/desktop-launch-dmg" | | 537 | + hdiutil attach -nobrowse -readonly -mountpoint "$mount" "$(ls "$GITHUB_WORKSPACE"/release/*.dmg)" | | 538 | + trap 'hdiutil detach "$mount" -force >/dev/null || true' EXIT | | 539 | + app=$(ls -d "$mount"/*.app) | | 540 | + executable=$(/usr/libexec/PlistBuddy -c "Print :CFBundleExecutable" "$app/Contents/Info.plist") | | 541 | + "${check[@]}" --executable "$app/Contents/MacOS/$executable" | | 542 | + else | | 543 | + sudo apt-get install -y xvfb | | 544 | + appimage=$(ls "$GITHUB_WORKSPACE"/release/*.AppImage) | | 545 | + chmod +x "$appimage" | | 546 | + (cd "$RUNNER_TEMP" && "$appimage" --appimage-extract >/dev/null) | | 547 | + xvfb-run -a "${check[@]}" --executable "$RUNNER_TEMP/squashfs-root/t3code" | | 548 | + fi | | 549 | +
| | 550 | + - name: Upload launch check output | | 551 | + if: failure() && inputs.launch_check | | 552 | + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | | 553 | + with: | | 554 | + name: desktop-launch-check-${{ inputs.platform }}-${{ inputs.arch }} | | 555 | + path: ${{ runner.temp }}/desktop-launch-check | | 556 | + if-no-files-found: ignore | | 557 | + | 520 | 558 | # The verify job runs what this host could not: the packaged natives and | 521 | 559 | # the CLI. Its scripts are bundled so that job needs no install. | 522 | 560 | - name: Stage verification inputs | |
Collapse file Copy file name to clipboardExpand all lines: .github/workflows/release.yml +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -619,6 +619,7 @@ jobs: | 619 | 619 | rust_target: aarch64-apple-darwin | 620 | 620 | resource_key: darwin-arm64 | 621 | 621 | cli_archive: true | | 622 | + launch_check: true | 622 | 623 |
| 623 | 624 | desktop_mac_x64: | 624 | 625 | name: Desktop macOS x64 | @@ -668,6 +669,7 @@ jobs: | 668 | 669 | rust_target: x86_64-unknown-linux-gnu | 669 | 670 | resource_key: linux-x64 | 670 | 671 | cli_archive: true | | 672 | + launch_check: true | 671 | 673 |
| 672 | 674 | # node-pty has no Linux prebuild and compiles from source, so the arm64 app | 673 | 675 | # and archive are built on arm64 hardware rather than cross-built. | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/package.json +1-2Lines changed: 1 addition & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | "scripts": { | 8 | 8 | "ensure:electron": "node scripts/ensure-electron-runtime.mjs", | 9 | 9 | "start": "node scripts/start-electron.mjs", | 10 | | - "test": "vp test run --passWithNoTests", | 11 | | - "smoke-test": "node scripts/smoke-test.mjs" | | 10 | + "test": "vp test run --passWithNoTests" | 12 | 11 | }, | 13 | 12 | "dependencies": { | 14 | 13 | "@clerk/electron": "catalog:", | |
Collapse file Copy file name to clipboardExpand all lines: apps/desktop/scripts/smoke-test.mjs -58Lines changed: 0 additions & 58 deletions Collapse file Copy file name to clipboardExpand all lines: docs/operations/release.md +1Lines changed: 1 addition & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -36,6 +36,7 @@ the version. | 36 | 36 | - macOS `x64` DMG | 37 | 37 | - Linux `x64` and `arm64` AppImage and `.deb`, from one electron-builder run. The `.deb` updates in the app through electron-updater, which installs it with `dpkg`. | 38 | 38 | - Windows `x64` and `arm64` NSIS installer | | 39 | +- Opens the packaged Linux x64 AppImage (under Xvfb) and macOS arm64 DMG against a seeded database and opens a thread (`scripts/smoke-desktop-app.ts`). A build whose backend or bundle cannot start fails here, so nothing is published. The database in `scripts/fixtures/desktop-launch` is an old snapshot on purpose: the packaged server must migrate it forward, as it does for upgrading users. Do not regenerate it on schema changes. | 39 | 40 | - Publishes one GitHub Release with all produced files. | 40 | 41 | - Stable tags with a suffix after `X.Y.Z` (for example `1.2.3-alpha.1`) are published as GitHub prereleases. | 41 | 42 | - Only plain stable `X.Y.Z` releases are marked as the repository's latest release. | |
Collapse file Copy file name to clipboardExpand all lines: knip.jsonc +3-1Lines changed: 3 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 21 | 21 | // worktree setup (from t3.json) run directly. release-desktop.yml bundles the | 22 | 22 | // Windows verify script with esbuild through a path knip does not trace, | 23 | 23 | // electron-builder loads the macOS signer by path, and mobile-e2e.ts runs | 24 | | - // agent-device's CLI by path. | | 24 | + // agent-device's CLI by path. release-desktop.yml runs the desktop launch | | 25 | + // check through xvfb-run, which knip does not trace. | 25 | 26 | "entry": [ | 26 | 27 | // These fixture scripts are injected into a browser page by path. | 27 | 28 | "fixtures/*/*.js", | 28 | 29 | "knip-schemas.ts", | 29 | 30 | "mobile-native-client.ts", | 30 | 31 | "setup-worktree.ts", | 31 | 32 | "sign-macos.ts", | | 33 | + "smoke-desktop-app.ts", | 32 | 34 | "verify-windows-desktop-artifact.ts", | 33 | 35 | ], | 34 | 36 | "ignoreDependencies": ["agent-device", "esbuild"], | |
Collapse file Copy file name to clipboardExpand all lines: package.json -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 39 | 39 | "test:cached": "node scripts/test-cached.ts", | 40 | 40 | "test:perf:v2-wire": "vp test run apps/server/src/orchestration-v2/WireProjection.test.ts apps/server/src/orchestration-v2/threadHistoryPaging.test.ts apps/server/src/orchestration-v2/ThreadStream.test.ts apps/server/src/orchestration-v2/ThreadTransportPerformance.test.ts apps/server/src/orchestration-v2/ShellStream.test.ts apps/server/src/orchestration-v2/CommandPolicy.test.ts apps/server/src/orchestration-v2/runtimeLayer.test.ts apps/server/src/ws.test.ts packages/contracts/src/orchestrationV2.test.ts packages/client-runtime/src/operations/commands.test.ts packages/client-runtime/src/operations/commands.performance.test.ts packages/client-runtime/src/state/boundedThreadSnapshotHttp.test.ts packages/client-runtime/src/state/threadHistoryController.test.ts packages/client-runtime/src/state/threadHistoryMerge.test.ts packages/client-runtime/src/state/threads-sync.test.ts packages/client-runtime/src/state/shellReducer.test.ts", | 41 | 41 | "test:resource-monitor": "cargo test --locked --manifest-path native/resource-monitor/Cargo.toml", | 42 | | - "test:desktop-smoke": "vp run --filter @t3tools/desktop smoke-test", | 43 | 42 | "fmt": "vp fmt", | 44 | 43 | "fmt:check": "vp fmt --check", | 45 | 44 | "dist:desktop:artifact": "node scripts/build-desktop-artifact.ts", | |
Collapse file Copy file name to clipboardExpand all lines: pnpm-lock.yaml +3Lines changed: 3 additions & 0 deletions Collapse file Copy file name to clipboard Collapse file Copy file name to clipboardExpand all lines: scripts/package.json +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 14 | 14 | "@t3tools/tailscale": "workspace:*", | 15 | 15 | "agent-device": "0.21.32", | 16 | 16 | "effect": "catalog:", | | 17 | + "playwright-core": "1.60.0", | 17 | 18 | "plist": "catalog:", | 18 | 19 | "pngjs": "7.0.0", | 19 | 20 | "sharp": "0.35.4" | |
|