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.
This commit is contained in:
1 parent
ea021e7ca9
commit
6a1143282e
2 files changed
+10
-2
No files matched your search
@@ -57,6 +57,14 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
targets: ${{ matrix.target }}
|
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)
|
- name: Install dependencies (Ubuntu only)
|
||||||
if: matrix.platform == 'ubuntu-latest'
|
if: matrix.platform == 'ubuntu-latest'
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
@@ -576,7 +576,7 @@ fn detect_gpus_macos() -> Vec<GpuInfo> {
|
|||||||
}
|
}
|
||||||
} else if line.starts_with("VRAM (Total):") {
|
} else if line.starts_with("VRAM (Total):") {
|
||||||
if let Some(gpu) = &mut current_gpu {
|
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) {
|
if let Some(mb) = parse_memory_string(&vram_str) {
|
||||||
gpu.memory_mb = Some(mb);
|
gpu.memory_mb = Some(mb);
|
||||||
log::info!("VRAM detectada: {} MB", mb);
|
log::info!("VRAM detectada: {} MB", mb);
|
||||||
@@ -714,7 +714,7 @@ fn get_nvidia_gpu_stats(gpu: &GpuInfo) -> Option<GpuStats> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let compute_usage_percent = parts[3].parse::<f32>().ok();
|
let compute_usage_percent = parts[3].parse::<f32>().ok();
|
||||||
let memory_usage_percent = parts[4].parse::<f32>().ok();
|
let _memory_usage_percent = parts[4].parse::<f32>().ok();
|
||||||
let overall_usage_percent = compute_usage_percent;
|
let overall_usage_percent = compute_usage_percent;
|
||||||
|
|
||||||
let temperature_celsius = parts[5].parse::<f32>().ok();
|
let temperature_celsius = parts[5].parse::<f32>().ok();
|
||||||
|
|||||||
Reference in new issue
Block a user