History

feat: add native resource telemetry

Replace scheduled process shell probes with a persistent native collector, Electron power/process telemetry, Effect services, diagnostics UI, attribution, and release packaging.

Julius Marminge committed 4 months ago

Commit dbd8a8e1 parent 79ad07162 files · +7741 −1957Browse files

Showing the changes to .github (2 of 62 files). Show all

Unified · Split

2 files
  1. .github/workflows/ci.yml +12 −0
  2. .github/workflows/release.yml +51 −0
.github/workflows/ci.yml+12−0
@@ -22,6 +22,9 @@ jobs: · 21 unmodified lines
22 cache: true22 cache: true
23 run-install: true23 run-install: true
24 24
25 - name: Setup Rust
26 uses: dtolnay/rust-toolchain@stable
27
25 - name: Ensure Electron runtime is installed28 - name: Ensure Electron runtime is installed
26 run: vp run --filter @t3tools/desktop ensure:electron29 run: vp run --filter @t3tools/desktop ensure:electron
27 30
@@ -31,6 +34,9 @@ jobs: · 3 unmodified lines
31 - name: Typecheck34 - name: Typecheck
32 run: vpr typecheck35 run: vpr typecheck
33 36
37 - name: Check resource monitor formatting
38 run: cargo fmt --manifest-path native/resource-monitor/Cargo.toml -- --check
39
34 - name: Build desktop pipeline40 - name: Build desktop pipeline
35 run: vp run build:desktop41 run: vp run build:desktop
36 42
@@ -54,12 +60,18 @@ jobs: · 17 unmodified lines
54 cache: true60 cache: true
55 run-install: true61 run-install: true
56 62
63 - name: Setup Rust
64 uses: dtolnay/rust-toolchain@stable
65
57 - name: Ensure Electron runtime is installed66 - name: Ensure Electron runtime is installed
58 run: vp run --filter @t3tools/desktop ensure:electron67 run: vp run --filter @t3tools/desktop ensure:electron
59 68
60 - name: Test69 - name: Test
61 run: vp run test70 run: vp run test
62 71
72 - name: Test resource monitor
73 run: cargo test --locked --manifest-path native/resource-monitor/Cargo.toml
74
63 test_browser:75 test_browser:
64 name: Test Browser76 name: Test Browser
65 runs-on: blacksmith-8vcpu-ubuntu-240477 runs-on: blacksmith-8vcpu-ubuntu-2404
.github/workflows/release.yml+51−0
@@ -272,21 +272,29 @@ jobs: · 271 unmodified lines
272 platform: mac272 platform: mac
273 target: dmg273 target: dmg
274 arch: arm64274 arch: arm64
275 rust_target: aarch64-apple-darwin
276 resource_key: darwin-arm64
275 - label: macOS x64277 - label: macOS x64
276 runner: blacksmith-12vcpu-macos-26278 runner: blacksmith-12vcpu-macos-26
277 platform: mac279 platform: mac
278 target: dmg280 target: dmg
279 arch: x64281 arch: x64
282 rust_target: x86_64-apple-darwin
283 resource_key: darwin-x64
280 - label: Linux x64284 - label: Linux x64
281 runner: blacksmith-32vcpu-ubuntu-2404285 runner: blacksmith-32vcpu-ubuntu-2404
282 platform: linux286 platform: linux
283 target: AppImage287 target: AppImage
284 arch: x64288 arch: x64
289 rust_target: x86_64-unknown-linux-gnu
290 resource_key: linux-x64
285 - label: Windows x64291 - label: Windows x64
286 runner: blacksmith-32vcpu-windows-2025292 runner: blacksmith-32vcpu-windows-2025
287 platform: win293 platform: win
288 target: nsis294 target: nsis
289 arch: x64295 arch: x64
296 rust_target: x86_64-pc-windows-msvc
297 resource_key: win32-x64
290 # - label: Windows arm64298 # - label: Windows arm64
291 # runner: windows-11-arm299 # runner: windows-11-arm
292 # platform: win300 # platform: win
@@ -306,6 +314,11 @@ jobs: · 13 unmodified lines
306 cache: true314 cache: true
307 run-install: true315 run-install: true
308 316
317 - name: Setup Rust
318 uses: dtolnay/rust-toolchain@stable
319 with:
320 targets: ${{ matrix.rust_target }}
321
309 - name: Download relay client tracing config322 - name: Download relay client tracing config
310 uses: actions/download-artifact@v8323 uses: actions/download-artifact@v8
311 with:324 with:
@@ -518,6 +531,19 @@ jobs: · 206 unmodified lines
518 # done531 # done
519 # fi532 # fi
520 533
534 - name: Collect resource monitor
535 shell: bash
536 run: |
537 set -euo pipefail
538 binary_name="t3-resource-monitor"
539 if [[ "${{ matrix.platform }}" == "win" ]]; then
540 binary_name="${binary_name}.exe"
541 fi
542 source_path="native/resource-monitor/target/${{ matrix.rust_target }}/release/${binary_name}"
543 target_dir="resource-monitor-publish/${{ matrix.resource_key }}"
544 mkdir -p "$target_dir"
545 cp "$source_path" "$target_dir/$binary_name"
546
521 - name: Upload build artifacts547 - name: Upload build artifacts
522 uses: actions/upload-artifact@v7548 uses: actions/upload-artifact@v7
523 with:549 with:
@@ -525,6 +551,13 @@ jobs: · 1 unmodified line
525 path: release-publish/*551 path: release-publish/*
526 if-no-files-found: error552 if-no-files-found: error
527 553
554 - name: Upload resource monitor
555 uses: actions/upload-artifact@v7
556 with:
557 name: resource-monitor-${{ matrix.resource_key }}
558 path: resource-monitor-publish/${{ matrix.resource_key }}/*
559 if-no-files-found: error
560
528 publish_cli:561 publish_cli:
529 name: Publish CLI to npm562 name: Publish CLI to npm
530 needs: [preflight, relay_public_config, build]563 needs: [preflight, relay_public_config, build]
@@ -579,6 +612,24 @@ jobs: · 48 unmodified lines
579 - name: Build CLI package612 - name: Build CLI package
580 run: vp run --filter t3 build613 run: vp run --filter t3 build
581 614
615 - name: Download resource monitors
616 uses: actions/download-artifact@v8
617 with:
618 pattern: resource-monitor-*
619 path: ${{ runner.temp }}/resource-monitors
620
621 - name: Bundle resource monitors into CLI package
622 shell: bash
623 run: |
624 set -euo pipefail
625 for artifact_dir in "$RUNNER_TEMP"/resource-monitors/resource-monitor-*; do
626 resource_key="${artifact_dir##*/resource-monitor-}"
627 target_dir="apps/server/dist/resource-monitor/${resource_key}"
628 mkdir -p "$target_dir"
629 cp "$artifact_dir"/t3-resource-monitor* "$target_dir/"
630 chmod +x "$target_dir"/t3-resource-monitor 2>/dev/null || true
631 done
632
582 - name: Publish CLI package633 - name: Publish CLI package
583 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose634 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose
584 635