feat(ci): try to have CUDA Toolkit for compiling and building

This commit is contained in:
Neko Ayaka
2025-07-09 16:37:31 +08:00
parent 017f009d65
commit a31671f951
2 changed files with 27 additions and 9 deletions
+10 -1
View File
@@ -77,15 +77,24 @@ jobs:
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Install CUDA Toolkit (Linux and Windows Only)
uses: Jimver/cuda-toolkit@v0.2.24
if: matrix.os == 'ubuntu-latest' || matrix.os == 'ubuntu-24.04-arm' || matrix.os == 'windows-latest'
with:
cuda: 12.5.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Dependencies
run: pnpm run build:packages
- name: Build Application
- name: Build Application (macOS Only)
run: cd apps/stage-tamagotchi && pnpm tauri build --target ${{ matrix.target }}
- name: Build Application (Linux and Windows Only)
run: cd apps/stage-tamagotchi && pnpm tauri build --target ${{ matrix.target }} --features cuda
- name: Rename Artifacts (Nightly)
if: ${{ github.event_name == 'schedule' }}
run: pnpm run -F @proj-airi/stage-tamagotchi rename-artifacts ${{ matrix.target }}
+17 -8
View File
@@ -9,6 +9,15 @@ edition = "2024"
rust-version = "1.85.0"
publish = false
[features]
default = []
cuda = [
"ort/cuda",
"candle-core/cuda",
"candle-nn/cuda",
"candle-transformers/cuda"
]
[lib]
name = "app_lib"
crate-type = [
@@ -64,16 +73,16 @@ candle-transformers = { version = "0.9.1", features = ["metal"] }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.61.1", features = ["Win32_UI_WindowsAndMessaging", "Win32_Foundation"] }
ort = { version = "2.0.0-rc.10", features = ["ndarray", "directml", "cuda"] }
candle-core = { version = "0.9.1", features = ["cuda"] }
candle-nn = { version = "0.9.1", features = ["cuda"] }
candle-transformers = { version = "0.9.1", features = ["cuda"] }
ort = { version = "2.0.0-rc.10", features = ["ndarray", "directml"] }
candle-core = { version = "0.9.1" }
candle-nn = { version = "0.9.1" }
candle-transformers = { version = "0.9.1" }
[target.'cfg(target_os = "linux")'.dependencies]
ort = { version = "2.0.0-rc.10", features = ["ndarray", "cuda"] }
candle-core = { version = "0.9.1", features = ["cuda"] }
candle-nn = { version = "0.9.1", features = ["cuda"] }
candle-transformers = { version = "0.9.1", features = ["cuda"] }
ort = { version = "2.0.0-rc.10", features = ["ndarray"] }
candle-core = { version = "0.9.1" }
candle-nn = { version = "0.9.1" }
candle-transformers = { version = "0.9.1" }
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
tauri-plugin-global-shortcut = "2.0.0"