From 3e813bbe7e7493f4cde00adcd320e1dff852e828 Mon Sep 17 00:00:00 2001 From: Vomitblood Date: Thu, 8 Aug 2024 00:45:20 +0800 Subject: [PATCH] changed github actions workflow to install rustup --- .github/workflows/build-validation.yml | 9 ++++++--- src-tauri/src/bin/testing.rs | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-validation.yml b/.github/workflows/build-validation.yml index b8f7515..f1e7d57 100644 --- a/.github/workflows/build-validation.yml +++ b/.github/workflows/build-validation.yml @@ -30,10 +30,13 @@ jobs: run: apt update && apt upgrade -y - name: Install dependencies for Tauri - run: apt install -y cargo libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev + run: apt install -y libwebkit2gtk-4.0-dev build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev - - name: Update Rust - run: rustup update + - name: Install Rust + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + . "$HOME/.cargo/env" + rustup update - name: Install mise run: | diff --git a/src-tauri/src/bin/testing.rs b/src-tauri/src/bin/testing.rs index 4bc045d..f5acda6 100644 --- a/src-tauri/src/bin/testing.rs +++ b/src-tauri/src/bin/testing.rs @@ -72,8 +72,8 @@ fn is_animated_webp(file_path: &std::path::Path) -> Result { } fn main() { // Example usage - let path = std::path::Path::new("path/to/your/image.webp"); - match determine_image_type(&path) { + let path = std::path::Path::new("/home/vomitblood/Downloads/title.keys"); + match determine_image_type(path) { Ok(image_type) => println!("Image type: {:?}", image_type), Err(e) => println!("Error determining image type: {}", e), }