From 6a1143282e83d7b53d17879de680304be8c7df31 Mon Sep 17 00:00:00 2001 From: Evandro Fonseca Junior Date: Thu, 27 Nov 2025 23:29:00 -0300 Subject: [PATCH] chore: update release workflow and system monitor - Added Rust caching step to the GitHub Actions release workflow to improve build performance. - Installed Tauri CLI version 2.9 in the release workflow for better compatibility. - Modified VRAM string handling in system_monitor.rs to ensure proper string conversion. - Updated memory usage variable naming for clarity in GPU stats function. --- .github/workflows/release.yml | 8 ++++++++ src-tauri/src/system_monitor.rs | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 706566d..25ce285 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -57,6 +57,14 @@ jobs: toolchain: stable targets: ${{ matrix.target }} + - name: Rust cache + uses: swatinem/rust-cache@v2 + with: + workspaces: './src-tauri -> target' + + - name: Install Tauri CLI + run: cargo install tauri-cli --version "^2.9" --locked + - name: Install dependencies (Ubuntu only) if: matrix.platform == 'ubuntu-latest' run: | diff --git a/src-tauri/src/system_monitor.rs b/src-tauri/src/system_monitor.rs index c930aeb..85959e6 100644 --- a/src-tauri/src/system_monitor.rs +++ b/src-tauri/src/system_monitor.rs @@ -576,7 +576,7 @@ fn detect_gpus_macos() -> Vec { } } else if line.starts_with("VRAM (Total):") { if let Some(gpu) = &mut current_gpu { - let vram_str = line.replace("VRAM (Total):", "").trim(); + let vram_str = line.replace("VRAM (Total):", "").trim().to_string(); if let Some(mb) = parse_memory_string(&vram_str) { gpu.memory_mb = Some(mb); log::info!("VRAM detectada: {} MB", mb); @@ -714,7 +714,7 @@ fn get_nvidia_gpu_stats(gpu: &GpuInfo) -> Option { }; let compute_usage_percent = parts[3].parse::().ok(); - let memory_usage_percent = parts[4].parse::().ok(); + let _memory_usage_percent = parts[4].parse::().ok(); let overall_usage_percent = compute_usage_percent; let temperature_celsius = parts[5].parse::().ok();