From f6637ec39a052d26199dacb70eff239ffbc7cfd3 Mon Sep 17 00:00:00 2001 From: James Maes Date: Wed, 13 May 2026 06:55:49 -0500 Subject: [PATCH] ci(actions): fix typecheck/build order + share webview artifact across jobs (#161) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Three surgical fixes to .github/workflows/ci.yml from the first develop-push validation cycle: 1. Webview job: typecheck ran before build, so packages/hud TS imports of @jarvis/bus failed (TS2307). Reordered: install → build → typecheck → test. Build invokes scripts/build-webview.sh, producing App/Resources/webview/ directly. 2. swift-packages job: 6 packages (AgentCore/Bus/Harness/MCP/Voice/VoiceLog) failed with 'bus not mounted' because BusTests mount real WKWebView. Added needs: [webview] + download-artifact for the new webview-resources artifact. 3. app-build job: replaced inline pnpm+node+build-webview.sh with the same artifact download. One webview build serves all consumers. Artifact renamed webview-dist → webview-resources (production-stamped App/Resources/webview/ tree). Old name was 1 day old, no external consumers. --- .github/workflows/ci.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c25af49..a4dcad7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,6 +107,7 @@ jobs: swift-packages: name: SPM ${{ matrix.package }} runs-on: macos-15 + needs: [webview] strategy: fail-fast: false matrix: @@ -133,6 +134,16 @@ jobs: run: | swift --version xcodebuild -version + # Download the production webview bundle so Bus + downstream packages + # (AgentCore / Harness / MCP / Voice / VoiceLog) can mount a real + # WKWebView with a working JS bridge. Without this, BusTests fail + # with `Error: bus not mounted` because index.html + the JS bundle + # are missing from App/Resources/webview/. + - name: Download webview resources + uses: actions/download-artifact@v4 + with: + name: webview-resources + path: App/Resources/webview/ - name: Cache SPM build artifacts uses: actions/cache@v4 with: @@ -153,20 +164,14 @@ jobs: - uses: actions/checkout@v4 - name: Select Xcode run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer || sudo xcode-select -s /Applications/Xcode.app/Contents/Developer - - name: Setup pnpm - uses: pnpm/action-setup@v4 - with: - version: 10.30.2 - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "20" - cache: "pnpm" - cache-dependency-path: webview/pnpm-lock.yaml - name: Install xcodegen run: brew install xcodegen - - name: Build webview (produces App/Resources/webview/) - run: bash scripts/build-webview.sh + # Reuse the webview build from the upstream job rather than rebuilding. + - name: Download webview resources + uses: actions/download-artifact@v4 + with: + name: webview-resources + path: App/Resources/webview/ - name: check-app-builds.sh run: bash scripts/check-app-builds.sh - name: verify-codesign-settings.sh