Copy reviewed staged and unstaged source edits into isolated worktrees #47
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Native desktop | |
| on: | |
| push: | |
| branches: [native-0.20] | |
| pull_request: | |
| paths: ['native/**', 'src-tauri/**', 'ui/**', 'licenses/native/**', 'packaging/native-runtime/**', 'scripts/*native*.mjs', 'scripts/native-mcp-peer/**', 'Cargo.toml', 'Cargo.lock', '.github/workflows/native.yml'] | |
| permissions: | |
| contents: read | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 45 | |
| env: | |
| RUSTUP_TOOLCHAIN: '1.95.0' | |
| steps: | |
| - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 | |
| with: | |
| node-version: '22' | |
| cache: npm | |
| cache-dependency-path: ui/package-lock.json | |
| - name: Native window dependencies | |
| run: sudo apt-get update && sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev librsvg2-dev libayatana-appindicator3-dev patchelf webkit2gtk-driver xvfb | |
| - run: npm --prefix ui ci && npm --prefix ui run build && npm --prefix ui test | |
| - name: Install pinned Rust toolchain | |
| run: rustup toolchain install 1.95.0 --profile minimal --component rustfmt --component clippy | |
| - run: cargo +1.95.0 fmt --all --check | |
| - run: cargo +1.95.0 clippy --workspace --all-targets --locked -- -D warnings | |
| - run: cargo +1.95.0 test --workspace --locked | |
| - run: cargo +1.95.0 build -p shadowcode-desktop --locked | |
| - name: Exercise the native CLI without a display | |
| run: node scripts/test-native-cli.mjs | |
| - name: Stress repeated native tasks, cancellation, output and cleanup | |
| run: node scripts/test-native-stress.mjs | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: native-stress-diagnostics | |
| path: artifacts/native-stress | |
| - name: Exercise the native terminal through a real PTY | |
| run: node scripts/test-native-tui.mjs | |
| - name: Exercise the native MCP server without a display | |
| run: node scripts/test-native-mcp-server.mjs | |
| - name: Exercise the authenticated native MCP HTTP server | |
| run: SHADOW_MCP_TRANSPORT=http node scripts/test-native-mcp-server.mjs | |
| - name: Install independent MCP test clients | |
| run: npm --prefix scripts/native-mcp-peer ci --ignore-scripts --no-audit --no-fund | |
| - name: Verify MCP interoperability with official TypeScript clients | |
| run: node scripts/test-native-mcp-peer.mjs | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: native-mcp-server-diagnostics | |
| path: | | |
| artifacts/native-mcp-server* | |
| artifacts/native-mcp-peer | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: native-cli-diagnostics | |
| path: | | |
| artifacts/native-cli | |
| artifacts/native-tui | |
| - run: cargo +1.95.0 install tauri-driver --version 2.0.6 --locked | |
| - name: Exercise the native window | |
| run: xvfb-run -a -s '-screen 0 1440x1100x24' dbus-run-session -- node scripts/test-native-desktop.mjs | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: native-window-diagnostics | |
| path: artifacts/native | |
| - run: cargo +1.95.0 build --release -p shadowcode-core --examples --locked | |
| - name: Check pinned-source failures and mirror recovery | |
| run: node --test scripts/test-native-source-fetch.mjs | |
| - name: Build native development packages with dependency notices | |
| run: node scripts/build-native.mjs | |
| - name: Inspect both packages | |
| run: node scripts/check-native-package.mjs target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage target/release/bundle/deb/ShadowCode_0.20.0_amd64.deb | |
| - name: Rebuild the shipped runtime sources without network access | |
| run: node scripts/test-native-runtime-sources.mjs | |
| - name: Exercise concurrent AppImage extraction and shutdown | |
| run: node scripts/test-native-runtime.mjs | |
| - name: Exercise the packaged CLI without a display | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_CLI_ARGS: '["--appimage-extract-and-run"]' | |
| SHADOW_CLI_ARTIFACTS: artifacts/native-package/cli | |
| run: node scripts/test-native-cli.mjs | |
| - name: Exercise the packaged native terminal | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_CLI_ARGS: '["--appimage-extract-and-run"]' | |
| SHADOW_TUI_ARTIFACTS: artifacts/native-package/tui | |
| run: node scripts/test-native-tui.mjs | |
| - name: Exercise the packaged native window | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_DESKTOP_ARGS: '["--appimage-extract-and-run","ui"]' | |
| SHADOW_NATIVE_DEFAULT_PROFILE: '1' | |
| SHADOW_NATIVE_ARTIFACTS: artifacts/native-package/window | |
| run: xvfb-run -a -s '-screen 0 1440x1100x24' dbus-run-session -- node scripts/test-native-desktop.mjs | |
| - name: Exercise the packaged native MCP server | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_CLI_ARGS: '["--appimage-extract-and-run"]' | |
| SHADOW_MCP_ARTIFACTS: artifacts/native-package/mcp-server | |
| run: node scripts/test-native-mcp-server.mjs | |
| - name: Exercise the packaged native MCP HTTP server | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_CLI_ARGS: '["--appimage-extract-and-run"]' | |
| SHADOW_MCP_ARTIFACTS: artifacts/native-package/mcp-server-http | |
| SHADOW_MCP_TRANSPORT: http | |
| run: node scripts/test-native-mcp-server.mjs | |
| - name: Verify packaged MCP interoperability with official TypeScript clients | |
| env: | |
| SHADOW_DESKTOP_BINARY: ${{ github.workspace }}/target/release/bundle/appimage/ShadowCode_0.20.0_amd64.AppImage | |
| SHADOW_CLI_ARGS: '["--appimage-extract-and-run"]' | |
| SHADOW_MCP_PEER_ARTIFACTS: artifacts/native-package/mcp-peer | |
| run: node scripts/test-native-mcp-peer.mjs | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: native-package-diagnostics | |
| path: artifacts/native-package | |
| - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: native-linux-development | |
| retention-days: 14 | |
| path: | | |
| target/release/bundle/appimage/*.AppImage | |
| target/release/bundle/appimage/*runtime-sources.tar.gz | |
| target/release/bundle/deb/*.deb | |
| artifacts/native-package/SHA256SUMS |