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
2222 cache: true
2323 run-install: true
2424
25+ - name: Setup Rust
26+ uses: dtolnay/rust-toolchain@stable
27+
2528 - name: Ensure Electron runtime is installed
2629 run: vp run --filter @t3tools/desktop ensure:electron
2730
@@ -31,6 +34,9 @@ jobs: · 3 unmodified lines
3134 - name: Typecheck
3235 run: vpr typecheck
3336
37+ - name: Check resource monitor formatting
38+ run: cargo fmt --manifest-path native/resource-monitor/Cargo.toml -- --check
39+
3440 - name: Build desktop pipeline
3541 run: vp run build:desktop
3642
@@ -54,12 +60,18 @@ jobs: · 17 unmodified lines
5460 cache: true
5561 run-install: true
5662
63+ - name: Setup Rust
64+ uses: dtolnay/rust-toolchain@stable
65+
5766 - name: Ensure Electron runtime is installed
5867 run: vp run --filter @t3tools/desktop ensure:electron
5968
6069 - name: Test
6170 run: vp run test
6271
72+ - name: Test resource monitor
73+ run: cargo test --locked --manifest-path native/resource-monitor/Cargo.toml
74+
6375 test_browser:
6476 name: Test Browser
6577 runs-on: blacksmith-8vcpu-ubuntu-2404
.github/workflows/release.yml+51−0
@@ -272,21 +272,29 @@ jobs: · 271 unmodified lines
272272 platform: mac
273273 target: dmg
274274 arch: arm64
275+ rust_target: aarch64-apple-darwin
276+ resource_key: darwin-arm64
275277 - label: macOS x64
276278 runner: blacksmith-12vcpu-macos-26
277279 platform: mac
278280 target: dmg
279281 arch: x64
282+ rust_target: x86_64-apple-darwin
283+ resource_key: darwin-x64
280284 - label: Linux x64
281285 runner: blacksmith-32vcpu-ubuntu-2404
282286 platform: linux
283287 target: AppImage
284288 arch: x64
289+ rust_target: x86_64-unknown-linux-gnu
290+ resource_key: linux-x64
285291 - label: Windows x64
286292 runner: blacksmith-32vcpu-windows-2025
287293 platform: win
288294 target: nsis
289295 arch: x64
296+ rust_target: x86_64-pc-windows-msvc
297+ resource_key: win32-x64
290298 # - label: Windows arm64
291299 # runner: windows-11-arm
292300 # platform: win
@@ -306,6 +314,11 @@ jobs: · 13 unmodified lines
306314 cache: true
307315 run-install: true
308316
317+ - name: Setup Rust
318+ uses: dtolnay/rust-toolchain@stable
319+ with:
320+ targets: ${{ matrix.rust_target }}
321+
309322 - name: Download relay client tracing config
310323 uses: actions/download-artifact@v8
311324 with:
@@ -518,6 +531,19 @@ jobs: · 206 unmodified lines
518531 # done
519532 # fi
520533
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+
521547 - name: Upload build artifacts
522548 uses: actions/upload-artifact@v7
523549 with:
@@ -525,6 +551,13 @@ jobs: · 1 unmodified line
525551 path: release-publish/*
526552 if-no-files-found: error
527553
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+
528561 publish_cli:
529562 name: Publish CLI to npm
530563 needs: [preflight, relay_public_config, build]
@@ -579,6 +612,24 @@ jobs: · 48 unmodified lines
579612 - name: Build CLI package
580613 run: vp run --filter t3 build
581614
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+
582633 - name: Publish CLI package
583634 run: node apps/server/scripts/cli.ts publish --tag "${{ needs.preflight.outputs.cli_dist_tag }}" --app-version "${{ needs.preflight.outputs.version }}" --verbose
584635