From 6097e810c937b4a29e1c5b8eba50f64c362c64dd Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:49:21 +0300 Subject: [PATCH 01/29] refactor build --- .github/workflows/linux_special.yaml | 2 +- .github/workflows/windows_special.yml | 275 ++++++-------------------- desktop/src-tauri/Cargo.toml | 8 +- scripts/pre_build.js | 31 +-- 4 files changed, 76 insertions(+), 240 deletions(-) diff --git a/.github/workflows/linux_special.yaml b/.github/workflows/linux_special.yaml index 5c0dba09..829da964 100644 --- a/.github/workflows/linux_special.yaml +++ b/.github/workflows/linux_special.yaml @@ -136,7 +136,7 @@ jobs: # Run pre build - name: Run pre_build.js - run: bun scripts/pre_build.js --nvidia + run: bun scripts/pre_build.js --cuda env: INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index 73bf03d6..e298522a 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -1,221 +1,73 @@ name: Non avx2, cuda, portable on: - push: - tags: - - "v*" workflow_dispatch: jobs: - older-cpu: - permissions: - contents: write - - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - - - name: setup Bun - uses: oven-sh/setup-bun@v1 - - - name: Rust cache - uses: swatinem/rust-cache@v2 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Install frontend dependencies - run: bun install - working-directory: ./desktop - - - name: Cache Pre Build - id: cache-pre-build - uses: actions/cache@v4 - with: - path: | - desktop/src-tauri/openblas - desktop/src-tauri/clblast - desktop/src-tauri/ffmpeg - key: ${{ runner.os }}-pre-build - - # Run pre build - - name: Run pre_build.js - run: bun scripts/pre_build.js --older-cpu - - - name: Build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - with: - projectPath: "./desktop" - tauriScript: bunx tauri - - - name: Rename installer - run: | - # Get the list of exe files in the directory - $exe_files = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" - - # Rename each exe file - foreach ($file in $exe_files) { - # Split the file name and extension - $name = $file.BaseName - $ext = $file.Extension - - # New file name - $suffix = "older_cpu" - $new_name = "{0}_{1}{2}" -f $name, $suffix, $ext - - # Rename the file - Rename-Item -Path $file.FullName -NewName $new_name - Write-Output "Renamed '$($file.FullName)' to '$new_name'" - } - shell: pwsh - - - name: Upload installer - run: | - bun scripts/publish.js target/release/bundle/nsis/*.exe - shell: pwsh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - portable: + publish-tauri: permissions: contents: write strategy: fail-fast: false matrix: include: - - rust_version: "stable" # https://github.com/rustdesk/rustdesk/discussions/7503, also 1.78 has ABI change which causes our sciter version not working, https://blog.rust-lang.org/2024/03/30/i128-layout-update.html + # Windows no AVX2 + - platform: "windows-latest" + args: "--target x86_64-pc-windows-msvc" + pre-build-args: "--older-cpu" + rust-version: "stable" + + # Windows cuda 12.5.0 + - platform: "windows-latest" + args: '--target x86_64-pc-windows-msvc --features="cuda"' + pre-build-args: "--cuda" + name: 'cuda-12.5.0' + cuda-verison: '12.5.0' + rust-version: "stable" + + # Windows cuda 11.8.0 + - platform: "windows-latest" + args: '--target x86_64-pc-windows-msvc --features="cuda"' + pre-build-args: "--cuda" + name: 'cuda-11.8.0' + cuda-verison: '11.8.0' + rust-version: "stable" + + # Windows portable with opencl + - platform: "windows-latest" # Windows x86_64 + args: '--target x86_64-pc-windows-msvc --features="opencl"' + pre-build-args: "--portable" name: portable - - rust_version: "1.75" - name: portable-win7 - runs-on: windows-latest - steps: - - uses: actions/checkout@v4 - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - - - name: Setup cmake - uses: jwlawson/actions-setup-cmake@v2 - - - name: setup Bun - uses: oven-sh/setup-bun@v1 - - - name: Rust cache - uses: swatinem/rust-cache@v2 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - with: - toolchain: ${{ matrix.rust_version }} - components: "rustfmt" - - - name: Install frontend dependencies - run: bun install - working-directory: ./desktop - - - name: Cache Pre Build - id: cache-pre-build - uses: actions/cache@v4 - with: - path: | - desktop/src-tauri/openblas - desktop/src-tauri/clblast - desktop/src-tauri/ffmpeg - key: ${{ runner.os }}-pre-build - - # Run pre build - - name: Run pre_build.js - run: bun scripts/pre_build.js - - - name: Build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - WINDOWS_PORTABLE: 1 - with: - projectPath: "./desktop" - tauriScript: bunx tauri - - - name: Prepare Portable zip - run: | - # Get all EXE files in the specified directory - $exe_files = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" - - # Unzip each EXE file and zip the contents - foreach ($file in $exe_files) { - $name = $file.BaseName - $ext = "_${{ matrix.name }}.zip" - - # Create a new directory for extraction in the same folder - $extract_dir = New-Item -ItemType Directory -Path "$($file.DirectoryName)\$name" - echo $extract_dir.FullName + rust-version: "stable" - try { - # Unzip the EXE file into the new directory - & 7z x $file.FullName -o"$extract_dir" - - # Zip the contents into a new zip file - $zip_name = "{0}{1}" -f $name, $ext - & 7z a "$($file.DirectoryName)\$zip_name" "$extract_dir\*" - - Write-Output "Zipped contents of '$($file.FullName)' to '$zip_name'" - } finally { - # Remove the extraction directory - Remove-Item -Recurse -Force $extract_dir - } - } - shell: pwsh - - - name: Upload installer - run: | - bun scripts/publish.js target/release/bundle/nsis/*.zip - shell: pwsh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - nvidia: - permissions: - contents: write - strategy: - matrix: - cuda-version: [12.5.0, 11.8.0] + # Windows7 portable with opencl + - platform: "windows-latest" # Windows x86_64 + args: '--target x86_64-pc-windows-msvc --features="opencl"' + pre-build-args: "--portable" + name: portable-win7 + rust-version: "1.75" - runs-on: windows-latest + runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v4 - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 - # - name: Cache cuda installer - # id: cache-cuda-installer - # uses: actions/cache@v4 - # with: - # path: | - # cuda.exe - # key: ${{ runner.os }}-cuda-installer - name: Setup CUDA Toolkit + if: contains(matrix.args, 'cuda') id: cuda-toolkit shell: pwsh run: scripts/setup_cuda.ps1 env: - INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} + INPUT_CUDA_VERSION: ${{ matrix.cuda-verison }} - name: setup Bun uses: oven-sh/setup-bun@v1 - name: Rust cache uses: swatinem/rust-cache@v2 - with: - key: ${{ matrix.cuda-version }} - name: Install Rust stable uses: dtolnay/rust-toolchain@stable @@ -224,20 +76,21 @@ jobs: run: bun install working-directory: ./desktop + - name: Cache Pre Build id: cache-pre-build uses: actions/cache@v4 with: path: | desktop/src-tauri/openblas + desktop/src-tauri/clblast desktop/src-tauri/ffmpeg key: ${{ runner.os }}-pre-build # Run pre build - name: Run pre_build.js - run: bun scripts/pre_build.js --nvidia - env: - INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} + run: bun scripts/pre_build.js ${{ matrix.pre-build-args }} + - name: Build uses: tauri-apps/tauri-action@v0 @@ -245,37 +98,37 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} with: projectPath: "./desktop" tauriScript: bunx tauri + args: ${{ matrix.args }} - - name: Rename installer - run: | - $cudaPath = (Get-Item env:CUDA_PATH).Value - $cudaVersion = (Split-Path $cudaPath -Leaf) - # Get the list of exe files in the directory - $exe_files = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" - - # Rename each exe file - foreach ($file in $exe_files) { - # Split the file name and extension - $name = $file.BaseName - $ext = $file.Extension - - # New file name - $suffix = $cudaVersion - $new_name = "{0}_nvidia_{1}{2}" -f $name, $suffix, $ext - # Rename the file - Rename-Item -Path $file.FullName -NewName $new_name - Write-Output "Renamed '$($file.FullName)' to '$new_name'" - } + - name: Rename Installer + run: | + # Get the list of exe files in the directory + $exe_files = Get-ChildItem -Path "target\release\bundle\nsis\*.exe" + + # Rename each exe file + foreach ($file in $exe_files) { + # Split the file name and extension + $name = $file.BaseName + $ext = $file.Extension + + # New file name + $suffix = ${{ matrix.name }} + $new_name = "{0}_{1}{2}" -f $name, $suffix, $ext + + # Rename the file + Rename-Item -Path $file.FullName -NewName $new_name + Write-Output "Renamed '$($file.FullName)' to '$new_name'" + } shell: pwsh + - name: Upload installer run: | - bun scripts/publish.js target/release/bundle/nsis/*.exe + bun scripts/publish.js target/release/bundle/nsis/*.exe shell: pwsh env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index f7089a54..e67bd57a 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -53,7 +53,7 @@ vibe_core = { path = "../../core", features = ["openblas"] } openssl = { version = "0.10.63", features = ["vendored"] } [target.'cfg(windows)'.dependencies] -vibe_core = { path = "../../core", features = ["opencl", "openblas"] } +vibe_core = { path = "../../core", features = ["openblas"] } windows = { version = "0.56.0", features = [ "Win32_System_Console", "Win32_Foundation", @@ -70,6 +70,12 @@ objc_id = "0.1" [features] default = ["custom-protocol"] diarize = ["vibe_core/diarize"] +cuda = ["vibe_core/cuda"] +coreml = ["vibe_core/coreml"] +metal = ["vibe_core/metal"] +openblas = ["vibe_core/openblas"] +opencl = ["vibe_core/opencl"] + # this feature is used for production builds or when `devPath` points to the filesystem # DO NOT REMOVE!! custom-protocol = ["tauri/custom-protocol"] diff --git a/scripts/pre_build.js b/scripts/pre_build.js index d9120559..5e90d285 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -46,7 +46,7 @@ const config = { 'libavfilter-dev', 'libavdevice-dev', // FFMPEG 'libasound2-dev', // cpal - 'libomp-dev' // OpenMP in ggml.ai + 'libomp-dev', // OpenMP in ggml.ai ], }, macos: { @@ -98,7 +98,7 @@ if (platform == 'windows') { } // Setup CLBlast - if (!(await fs.exists(config.clblastRealname)) && !process.argv.includes('--nvidia')) { + if (!(await fs.exists(config.clblastRealname)) && !process.argv.includes('--cuda')) { await $`C:\\msys64\\usr\\bin\\wget.exe -nc --show-progress ${config.windows.clblastUrl} -O ${config.windows.clblastName}.zip` await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.zip` // 7z file inside await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.7z` // Inner folder @@ -124,7 +124,7 @@ if (platform == 'macos') { // Nvidia let cudaPath -if (process.argv.includes('--nvidia')) { +if (process.argv.includes('--cuda')) { if (process.env['CUDA_PATH']) { cudaPath = process.env['CUDA_PATH'] } else if (platform === 'windows') { @@ -155,21 +155,8 @@ if (process.argv.includes('--nvidia')) { }, } await fs.writeFile('tauri.windows.conf.json', JSON.stringify(windowsConfig, null, 4)) - - // modify features in cargo.toml - let content = await fs.readFile('Cargo.toml', { encoding: 'utf-8' }) - content = content.replace('opencl', 'cuda') - await fs.writeFile('Cargo.toml', content) } if (platform === 'linux') { - // modify features in cargo.toml - let content = await fs.readFile('Cargo.toml', { encoding: 'utf-8' }) - content = content.replace( - 'vibe_core = { path = "../../core", features = ["openblas"] }', - 'vibe_core = { path = "../../core", features = ["openblas", "cuda"] }' - ) - await fs.writeFile('Cargo.toml', content) - // Add cuda toolkit depends package const tauriConfigContent = await fs.readFile('tauri.linux.conf.json', { encoding: 'utf-8' }) const tauriConfig = JSON.parse(tauriConfigContent) @@ -178,16 +165,6 @@ if (process.argv.includes('--nvidia')) { } } -// Linux OpenCL -if (platform === 'linux' && process.argv.includes('--opencl')) { - let content = await fs.readFile('Cargo.toml', { encoding: 'utf-8' }) - content = content.replace( - 'vibe_core = { path = "../../core", features = ["openblas"] }', - 'vibe_core = { path = "../../core", features = ["openblas", "opencl"] }' - ) - await fs.writeFile('Cargo.toml', content) -} - // Development hints if (!process.env.GITHUB_ENV) { console.log('\nCommands to build 🔨:') @@ -209,7 +186,7 @@ if (!process.env.GITHUB_ENV) { console.log(`$env:WHISPER_NO_FMA = "ON"`) console.log(`$env:WHISPER_NO_F16C = "ON"`) } - if (process.argv.includes('--nvidia')) { + if (process.argv.includes('--cuda')) { console.log(`$env:CUDA_PATH = "${cudaPath}"`) } } From 15468e3004e38266d3d4841974d64c4869daea23 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:51:50 +0300 Subject: [PATCH 02/29] improve window special --- .github/workflows/windows_special.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index e298522a..3f845fb6 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -2,7 +2,11 @@ name: Non avx2, cuda, portable on: workflow_dispatch: - + inputs: + build_only: + description: 'Build without publishing' + required: false + default: 'false' jobs: publish-tauri: permissions: @@ -127,6 +131,7 @@ jobs: - name: Upload installer + if: github.event.inputs.build_only != 'true' run: | bun scripts/publish.js target/release/bundle/nsis/*.exe shell: pwsh From 32879035585471148c6fa58417a233c12ec0cd36 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 21:52:28 +0300 Subject: [PATCH 03/29] naming --- .github/workflows/windows_special.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index 3f845fb6..b031ffaa 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -1,4 +1,4 @@ -name: Non avx2, cuda, portable +name: Windows Non avx2, cuda, portable on: workflow_dispatch: From 3bb593cc1b0d8c7d2c8123558a772ed905a8b79e Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:06:02 +0300 Subject: [PATCH 04/29] remove target --- .github/workflows/windows_special.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index b031ffaa..976d689b 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -17,13 +17,13 @@ jobs: include: # Windows no AVX2 - platform: "windows-latest" - args: "--target x86_64-pc-windows-msvc" + args: "" pre-build-args: "--older-cpu" rust-version: "stable" # Windows cuda 12.5.0 - platform: "windows-latest" - args: '--target x86_64-pc-windows-msvc --features="cuda"' + args: '--features="cuda"' pre-build-args: "--cuda" name: 'cuda-12.5.0' cuda-verison: '12.5.0' @@ -31,7 +31,7 @@ jobs: # Windows cuda 11.8.0 - platform: "windows-latest" - args: '--target x86_64-pc-windows-msvc --features="cuda"' + args: '--features="cuda"' pre-build-args: "--cuda" name: 'cuda-11.8.0' cuda-verison: '11.8.0' @@ -39,14 +39,14 @@ jobs: # Windows portable with opencl - platform: "windows-latest" # Windows x86_64 - args: '--target x86_64-pc-windows-msvc --features="opencl"' + args: '--features="opencl"' pre-build-args: "--portable" name: portable rust-version: "stable" # Windows7 portable with opencl - platform: "windows-latest" # Windows x86_64 - args: '--target x86_64-pc-windows-msvc --features="opencl"' + args: '--features="opencl"' pre-build-args: "--portable" name: portable-win7 rust-version: "1.75" From 8ece152e4b0f204e38fcbfe8342e9c0747eb8bdd Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:09:09 +0300 Subject: [PATCH 05/29] refactor linux build --- .github/workflows/linux_special.yaml | 181 --------------------------- .github/workflows/linux_special.yml | 132 +++++++++++++++++++ 2 files changed, 132 insertions(+), 181 deletions(-) delete mode 100644 .github/workflows/linux_special.yaml create mode 100644 .github/workflows/linux_special.yml diff --git a/.github/workflows/linux_special.yaml b/.github/workflows/linux_special.yaml deleted file mode 100644 index 829da964..00000000 --- a/.github/workflows/linux_special.yaml +++ /dev/null @@ -1,181 +0,0 @@ -name: Linux with OpenCL and Cuda - -on: - push: - tags: - - "v*" - pull_request: - workflow_dispatch: - inputs: - build_only: - description: 'Build without publishing' - required: false - default: 'false' -jobs: - publish-tauri: - permissions: - contents: write - strategy: - fail-fast: false - matrix: - include: - - platform: "ubuntu-22.04" - platform_version: "22.04" - - platform: "ubuntu-24.04" - platform_version: "24.04" - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v4 - - - name: setup Bun - uses: oven-sh/setup-bun@v1 - - - name: Rust cache - uses: swatinem/rust-cache@v2 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Install frontend dependencies - run: bun install - working-directory: ./desktop - - - name: Cache Pre Build - id: cache-pre-build - uses: actions/cache@v4 - with: - path: | - desktop/src-tauri/openblas - key: ${{ matrix.platform }}-pre-build - - # Run pre build - - name: Run pre_build.js - run: bun scripts/pre_build.js --opencl - - - name: Build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - with: - projectPath: "./desktop" - tauriScript: bunx tauri - - - name: Rename installer - run: | - - # Rename .deb files - for file in target/release/bundle/deb/*.deb; do - name=$(basename "$file" .deb) - new_name="${name}_${{ matrix.platform }}_opencl.deb" - mv "$file" "target/release/bundle/deb/$new_name" - echo "Renamed '$file' to '$new_name'" - done - - # Rename .rpm files - for file in target/release/bundle/rpm/*.rpm; do - name=$(basename "$file" .rpm) - new_name="${name}_${{ matrix.platform_version }}_opencl.rpm" - mv "$file" "target/release/bundle/rpm/$new_name" - echo "Renamed '$file' to '$new_name'" - done - shell: bash - - - name: Upload installer - if: github.event.inputs.build_only != 'true' - run: | - bun scripts/publish.js target/release/bundle/deb/*.deb - bun scripts/publish.js target/release/bundle/rpm/*.rpm - shell: pwsh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - publish-tauri-linux-cuda: - permissions: - contents: write - strategy: - fail-fast: false - matrix: - include: - - platform: "ubuntu-22.04" - cuda-version: "12.4.1" - platform_version: "22.04" - - platform: "ubuntu-24.04" - cuda-version: "12.4.1" - platform_version: "24.04" - - runs-on: ${{ matrix.platform }} - steps: - - uses: actions/checkout@v4 - - - uses: Jimver/cuda-toolkit@v0.2.15 - id: cuda-toolkit - with: - cuda: ${{ matrix.cuda-version }} - - - name: setup Bun - uses: oven-sh/setup-bun@v1 - - - name: Rust cache - uses: swatinem/rust-cache@v2 - - - name: Install Rust stable - uses: dtolnay/rust-toolchain@stable - - - name: Install frontend dependencies - run: bun install - working-directory: ./desktop - - - name: Cache Pre Build - id: cache-pre-build - uses: actions/cache@v4 - with: - path: | - desktop/src-tauri/openblas - key: ${{ matrix.platform }}-pre-build - - # Run pre build - - name: Run pre_build.js - run: bun scripts/pre_build.js --cuda - env: - INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} - - - name: Build - uses: tauri-apps/tauri-action@v0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} - TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} - INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} - with: - projectPath: "./desktop" - tauriScript: bunx tauri - - - name: Rename installer - run: | - - # Rename .deb files - for file in target/release/bundle/deb/*.deb; do - name=$(basename "$file" .deb) - new_name="${name}_${{ matrix.platform }}_nvidia_${{ matrix.cuda-version }}.deb" - mv "$file" "target/release/bundle/deb/$new_name" - echo "Renamed '$file' to '$new_name'" - done - - # Rename .rpm files - for file in target/release/bundle/rpm/*.rpm; do - name=$(basename "$file" .rpm) - new_name="${name}_${{ matrix.platform_version }}_nvidia_${{ matrix.cuda-version }}.rpm" - mv "$file" "target/release/bundle/rpm/$new_name" - echo "Renamed '$file' to '$new_name'" - done - shell: bash - - - name: Upload installer - if: github.event.inputs.build_only != 'true' - run: | - bun scripts/publish.js target/release/bundle/deb/*.deb - bun scripts/publish.js target/release/bundle/rpm/*.rpm - shell: pwsh - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml new file mode 100644 index 00000000..84957f8f --- /dev/null +++ b/.github/workflows/linux_special.yml @@ -0,0 +1,132 @@ +name: Linux with OpenCL and Cuda + +on: + workflow_dispatch: + inputs: + build_only: + description: 'Build without publishing' + required: false + default: 'false' +jobs: + publish-tauri: + permissions: + contents: write + strategy: + fail-fast: false + matrix: + include: + # Ubuntu 22.04 + - platform: "ubuntu-22.04" + args: "" + pre-build-args: "" + rust-version: "stable" + name: "ubuntu-22.0" + + # Ubuntu 24.04 + - platform: "ubuntu-24.04" + args: "" + pre-build-args: "" + rust-version: "stable" + name: "ubuntu-24.0" + + + # Ubuntu 22.04 cuda + - platform: "ubuntu-22.04" + args: '--features "cuda"' + pre-build-args: "--cuda" + rust-version: "stable" + cuda-version: "12.4.1" + name: "ubuntu-22.04-cuda-12" + + # Ubuntu 24.04 cuda + - platform: "ubuntu-24.04" + args: '--features "cuda"' + pre-build-args: "--cuda" + rust-version: "stable" + cuda-version: "12.4.1" + name: "ubuntu-24.04-cuda-12" + + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@v4 + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v2 + + + - uses: Jimver/cuda-toolkit@v0.2.15 + if: contains(matrix.args, 'cuda') + id: cuda-toolkit + with: + cuda: ${{ matrix.cuda-version }} + + - name: setup Bun + uses: oven-sh/setup-bun@v1 + + - name: Rust cache + uses: swatinem/rust-cache@v2 + + - name: Install Rust stable + uses: dtolnay/rust-toolchain@stable + + - name: Install frontend dependencies + run: bun install + working-directory: ./desktop + + + - name: Cache Pre Build + id: cache-pre-build + uses: actions/cache@v4 + with: + path: | + desktop/src-tauri/openblas + desktop/src-tauri/clblast + desktop/src-tauri/ffmpeg + key: ${{ runner.os }}-pre-build + + # Run pre build + - name: Run pre_build.js + run: bun scripts/pre_build.js ${{ matrix.pre-build-args }} + + + - name: Build + uses: tauri-apps/tauri-action@v0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} + TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + INPUT_CUDA_VERSION: ${{ matrix.cuda-version }} + with: + projectPath: "./desktop" + tauriScript: bunx tauri + args: ${{ matrix.args }} + + + - name: Rename installer + run: | + + # Rename .deb files + for file in target/release/bundle/deb/*.deb; do + name=$(basename "$file" .deb) + new_name="${name}_${{ matrix.name }}.deb" + mv "$file" "target/release/bundle/deb/$new_name" + echo "Renamed '$file' to '$new_name'" + done + + # Rename .rpm files + for file in target/release/bundle/rpm/*.rpm; do + name=$(basename "$file" .rpm) + new_name="${name}_${{ matrix.name }}.rpm" + mv "$file" "target/release/bundle/rpm/$new_name" + echo "Renamed '$file' to '$new_name'" + done + shell: bash + + + - name: Upload installer + if: github.event.inputs.build_only != 'true' + run: | + bun scripts/publish.js target/release/bundle/deb/*.deb + bun scripts/publish.js target/release/bundle/rpm/*.rpm + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From e3534a03f78f0cc652171c91c926f13154acb787 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:10:46 +0300 Subject: [PATCH 06/29] fixl inux ci --- .github/workflows/linux_special.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml index 84957f8f..b39f1960 100644 --- a/.github/workflows/linux_special.yml +++ b/.github/workflows/linux_special.yml @@ -50,10 +50,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v2 - - - uses: Jimver/cuda-toolkit@v0.2.15 if: contains(matrix.args, 'cuda') id: cuda-toolkit From 60f46a57acbb4fb301f9252f02f5b34f0395c7a8 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:15:15 +0300 Subject: [PATCH 07/29] misc --- .github/workflows/linux_special.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml index b39f1960..ccfef28e 100644 --- a/.github/workflows/linux_special.yml +++ b/.github/workflows/linux_special.yml @@ -20,14 +20,14 @@ jobs: args: "" pre-build-args: "" rust-version: "stable" - name: "ubuntu-22.0" + name: "ubuntu-22.04" # Ubuntu 24.04 - platform: "ubuntu-24.04" args: "" pre-build-args: "" rust-version: "stable" - name: "ubuntu-24.0" + name: "ubuntu-24.04" # Ubuntu 22.04 cuda From ae82fab5cf8436095c88edebb0a851f1cc09f7b9 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:17:50 +0300 Subject: [PATCH 08/29] refactor ci --- .github/workflows/linux_special.yml | 8 ++++---- .github/workflows/windows_special.yml | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml index ccfef28e..4b6ae406 100644 --- a/.github/workflows/linux_special.yml +++ b/.github/workflows/linux_special.yml @@ -3,10 +3,10 @@ name: Linux with OpenCL and Cuda on: workflow_dispatch: inputs: - build_only: - description: 'Build without publishing' + skip-publish: + description: 'Skip publish' required: false - default: 'false' + default: '0' jobs: publish-tauri: permissions: @@ -120,7 +120,7 @@ jobs: - name: Upload installer - if: github.event.inputs.build_only != 'true' + if: github.event.inputs.skip-publish != '1' run: | bun scripts/publish.js target/release/bundle/deb/*.deb bun scripts/publish.js target/release/bundle/rpm/*.rpm diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index 976d689b..ef9191af 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -3,10 +3,10 @@ name: Windows Non avx2, cuda, portable on: workflow_dispatch: inputs: - build_only: - description: 'Build without publishing' + skip-publish: + description: 'Skip publish' required: false - default: 'false' + default: '0' jobs: publish-tauri: permissions: @@ -131,7 +131,7 @@ jobs: - name: Upload installer - if: github.event.inputs.build_only != 'true' + if: github.event.inputs.skip-publish != '1' run: | bun scripts/publish.js target/release/bundle/nsis/*.exe shell: pwsh From b9316f7d38648647ef57082a91b292139a2d34dd Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:31:35 +0300 Subject: [PATCH 09/29] refactor ci --- .github/workflows/release.yml | 3 ++- .github/workflows/windows_special.yml | 8 ++++---- desktop/src-tauri/tauri.windows.conf.json | 6 ++---- scripts/pre_build.js | 22 ++++++++++++++++++---- 4 files changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dd0f94d..df2516a4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,7 @@ jobs: args: "" - platform: "windows-latest" # Windows x86_64 args: "--target x86_64-pc-windows-msvc" + pre-build-args: "--opencl --openblas" runs-on: ${{ matrix.platform }} steps: @@ -55,7 +56,7 @@ jobs: # Run pre build - name: Run pre_build.js on ${{ matrix.platform }} - run: bun scripts/pre_build.js + run: bun scripts/pre_build.js ${{ matrix.pre-build-args }} - name: Build uses: tauri-apps/tauri-action@v0 diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index ef9191af..516e1b41 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -17,8 +17,8 @@ jobs: include: # Windows no AVX2 - platform: "windows-latest" - args: "" - pre-build-args: "--older-cpu" + args: '--features="opencl"' + pre-build-args: "--older-cpu --opencl" rust-version: "stable" # Windows cuda 12.5.0 @@ -40,14 +40,14 @@ jobs: # Windows portable with opencl - platform: "windows-latest" # Windows x86_64 args: '--features="opencl"' - pre-build-args: "--portable" + pre-build-args: "--portable --opencl" name: portable rust-version: "stable" # Windows7 portable with opencl - platform: "windows-latest" # Windows x86_64 args: '--features="opencl"' - pre-build-args: "--portable" + pre-build-args: "--portable --opencl" name: portable-win7 rust-version: "1.75" diff --git a/desktop/src-tauri/tauri.windows.conf.json b/desktop/src-tauri/tauri.windows.conf.json index 17830935..397e2c23 100644 --- a/desktop/src-tauri/tauri.windows.conf.json +++ b/desktop/src-tauri/tauri.windows.conf.json @@ -2,9 +2,7 @@ "bundle": { "resources": { "ffmpeg\\bin\\x64\\*": "./", - "openblas\\bin\\*.dll": "./", - "clblast\\bin\\*.dll": "./", - "C:\\vcpkg\\packages\\opencl_x64-windows\\bin\\*.dll": "./" + "openblas\\bin\\*.dll": "./" } } -} +} \ No newline at end of file diff --git a/scripts/pre_build.js b/scripts/pre_build.js index 5e90d285..0082c752 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -165,6 +165,18 @@ if (process.argv.includes('--cuda')) { } } +if (process.argv.includes('--opencl')) { + if (platform === 'windows') { + const tauriConfigContent = await fs.readFile('tauri.windows.conf.json', { encoding: 'utf-8' }) + const tauriConfig = JSON.parse(tauriConfigContent) + tauriConfig.bundle.resources['clblast\\bin\\*.dll'] = './' + tauriConfig.bundle.resources['C:\\vcpkg\\packages\\opencl_x64-windows\\bin\\*.dll'] = './' + await fs.writeFile('tauri.windows.conf.json', JSON.stringify(tauriConfig, null, 4)) + + console.log(`$env:CLBlast_DIR = "${exports.clblast}"`) + } +} + // Development hints if (!process.env.GITHUB_ENV) { console.log('\nCommands to build 🔨:') @@ -177,7 +189,6 @@ if (!process.env.GITHUB_ENV) { if (platform == 'windows') { console.log(`$env:FFMPEG_DIR = "${exports.ffmpeg}"`) console.log(`$env:OPENBLAS_PATH = "${exports.openBlas}"`) - console.log(`$env:CLBlast_DIR = "${exports.clblast}"`) console.log(`$env:LIBCLANG_PATH = "${exports.libClang}"`) console.log(`$env:PATH += "${exports.cmake}"`) if (buildForOldCPU) { @@ -215,9 +226,12 @@ if (process.env.GITHUB_ENV) { const openblas = `OPENBLAS_PATH=${exports.openBlas}\n` console.log('Adding ENV', openblas) await fs.appendFile(process.env.GITHUB_ENV, openblas) - const clblast = `CLBlast_DIR=${exports.clblast}\n` - console.log('Adding ENV', clblast) - await fs.appendFile(process.env.GITHUB_ENV, clblast) + + if (process.argv.includes('--opencl')) { + const clblast = `CLBlast_DIR=${exports.clblast}\n` + console.log('Adding ENV', clblast) + await fs.appendFile(process.env.GITHUB_ENV, clblast) + } if (buildForOldCPU) { await fs.appendFile(process.env.GITHUB_ENV, `WHISPER_NO_AVX=ON\n`) From d448dad15ccb9ff062c8431cd242700631e694b7 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:32:19 +0300 Subject: [PATCH 10/29] fix windows ci --- .github/workflows/windows_special.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index 516e1b41..a7b0a4b8 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -120,7 +120,7 @@ jobs: $ext = $file.Extension # New file name - $suffix = ${{ matrix.name }} + $suffix = "${{ matrix.name }}" $new_name = "{0}_{1}{2}" -f $name, $suffix, $ext # Rename the file From cb043a55d881c963b0236f50a661e0d7ed9e3cbe Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:35:49 +0300 Subject: [PATCH 11/29] fix cuda ci --- .github/workflows/linux_special.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/linux_special.yml b/.github/workflows/linux_special.yml index 4b6ae406..e72bdfc9 100644 --- a/.github/workflows/linux_special.yml +++ b/.github/workflows/linux_special.yml @@ -55,6 +55,7 @@ jobs: id: cuda-toolkit with: cuda: ${{ matrix.cuda-version }} + method: 'network' - name: setup Bun uses: oven-sh/setup-bun@v1 From a317b020e98178c9c0487940f7610d8a384e893b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:45:53 +0300 Subject: [PATCH 12/29] improve ci --- .github/workflows/release.yml | 2 +- .github/workflows/windows_special.yml | 16 +++++------ desktop/src-tauri/Cargo.toml | 4 +-- desktop/src-tauri/tauri.windows.conf.json | 3 +-- scripts/pre_build.js | 33 ++++++++++++++++------- 5 files changed, 35 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index df2516a4..7d12abbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - platform: "ubuntu-22.04" # Ubuntu x86_64 args: "" - platform: "windows-latest" # Windows x86_64 - args: "--target x86_64-pc-windows-msvc" + args: '--target x86_64-pc-windows-msvc --features "opencl,openblas"' pre-build-args: "--opencl --openblas" runs-on: ${{ matrix.platform }} diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index a7b0a4b8..465dc41b 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -18,20 +18,20 @@ jobs: # Windows no AVX2 - platform: "windows-latest" args: '--features="opencl"' - pre-build-args: "--older-cpu --opencl" + pre-build-args: "--older-cpu --opencl --openblas" rust-version: "stable" # Windows cuda 12.5.0 - platform: "windows-latest" - args: '--features="cuda"' - pre-build-args: "--cuda" + args: '--features="cuda,openblas"' + pre-build-args: "--cuda --openblas" name: 'cuda-12.5.0' cuda-verison: '12.5.0' rust-version: "stable" # Windows cuda 11.8.0 - platform: "windows-latest" - args: '--features="cuda"' + args: '--features="cuda,openblas"' pre-build-args: "--cuda" name: 'cuda-11.8.0' cuda-verison: '11.8.0' @@ -39,15 +39,15 @@ jobs: # Windows portable with opencl - platform: "windows-latest" # Windows x86_64 - args: '--features="opencl"' - pre-build-args: "--portable --opencl" + args: '--features="opencl,openblas"' + pre-build-args: "--portable --opencl --openblas" name: portable rust-version: "stable" # Windows7 portable with opencl - platform: "windows-latest" # Windows x86_64 - args: '--features="opencl"' - pre-build-args: "--portable --opencl" + args: '--features="opencl,openblas"' + pre-build-args: "--portable --opencl --openblas" name: portable-win7 rust-version: "1.75" diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index e67bd57a..668d5a75 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -49,11 +49,11 @@ urlencoding = "2.1.3" [target.'cfg(target_os = "linux")'.dependencies] -vibe_core = { path = "../../core", features = ["openblas"] } +vibe_core = { path = "../../core", features = [] } openssl = { version = "0.10.63", features = ["vendored"] } [target.'cfg(windows)'.dependencies] -vibe_core = { path = "../../core", features = ["openblas"] } +vibe_core = { path = "../../core", features = [] } windows = { version = "0.56.0", features = [ "Win32_System_Console", "Win32_Foundation", diff --git a/desktop/src-tauri/tauri.windows.conf.json b/desktop/src-tauri/tauri.windows.conf.json index 397e2c23..9bf567f4 100644 --- a/desktop/src-tauri/tauri.windows.conf.json +++ b/desktop/src-tauri/tauri.windows.conf.json @@ -1,8 +1,7 @@ { "bundle": { "resources": { - "ffmpeg\\bin\\x64\\*": "./", - "openblas\\bin\\*.dll": "./" + "ffmpeg\\bin\\x64\\*": "./" } } } \ No newline at end of file diff --git a/scripts/pre_build.js b/scripts/pre_build.js index 0082c752..d1a3cdb9 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -12,7 +12,10 @@ const platform = { linux: 'linux', }[os.platform()] const cwd = process.cwd() -const buildForOldCPU = process.argv.includes('--older-cpu') + +function hasFeature(name) { + return process.argv.includes(name) +} const config = { ffmpegRealname: 'ffmpeg', @@ -68,7 +71,7 @@ const exports = { if (platform == 'linux') { // Install APT packages await $`sudo apt-get update` - if (process.argv.includes('--opencl')) { + if (hasFeature('opencl')) { config.linux.aptPackages.push('libclblast-dev') } for (const name of config.linux.aptPackages) { @@ -88,7 +91,7 @@ if (platform == 'windows') { } // Setup OpenBlas - if (!(await fs.exists(config.openblasRealname))) { + if (!(await fs.exists(config.openblasRealname)) && hasFeature('openblas')) { await $`C:\\msys64\\usr\\bin\\wget.exe -nc --show-progress ${config.windows.openBlasUrl} -O ${config.windows.openBlasName}.zip` await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.openBlasName}.zip -o${config.openblasRealname}` await $`rm ${config.windows.openBlasName}.zip` @@ -98,7 +101,7 @@ if (platform == 'windows') { } // Setup CLBlast - if (!(await fs.exists(config.clblastRealname)) && !process.argv.includes('--cuda')) { + if (!(await fs.exists(config.clblastRealname)) && !hasFeature('cuda')) { await $`C:\\msys64\\usr\\bin\\wget.exe -nc --show-progress ${config.windows.clblastUrl} -O ${config.windows.clblastName}.zip` await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.zip` // 7z file inside await $`"C:\\Program Files\\7-Zip\\7z.exe" x ${config.windows.clblastName}.7z` // Inner folder @@ -124,7 +127,7 @@ if (platform == 'macos') { // Nvidia let cudaPath -if (process.argv.includes('--cuda')) { +if (hasFeature('cuda')) { if (process.env['CUDA_PATH']) { cudaPath = process.env['CUDA_PATH'] } else if (platform === 'windows') { @@ -165,7 +168,7 @@ if (process.argv.includes('--cuda')) { } } -if (process.argv.includes('--opencl')) { +if (hasFeature('opencl')) { if (platform === 'windows') { const tauriConfigContent = await fs.readFile('tauri.windows.conf.json', { encoding: 'utf-8' }) const tauriConfig = JSON.parse(tauriConfigContent) @@ -177,6 +180,16 @@ if (process.argv.includes('--opencl')) { } } +// OpenBlas +if (hasFeature('openblas')) { + if (platform === 'windows') { + const tauriConfigContent = await fs.readFile('tauri.windows.conf.json', { encoding: 'utf-8' }) + const tauriConfig = JSON.parse(tauriConfigContent) + tauriConfig.bundle.resources['openblas\\bin\\*.dll'] = './' + await fs.writeFile('tauri.windows.conf.json', JSON.stringify(tauriConfig, null, 4)) + } +} + // Development hints if (!process.env.GITHUB_ENV) { console.log('\nCommands to build 🔨:') @@ -191,13 +204,13 @@ if (!process.env.GITHUB_ENV) { console.log(`$env:OPENBLAS_PATH = "${exports.openBlas}"`) console.log(`$env:LIBCLANG_PATH = "${exports.libClang}"`) console.log(`$env:PATH += "${exports.cmake}"`) - if (buildForOldCPU) { + if (hasFeature('older-cpu')) { console.log(`$env:WHISPER_NO_AVX = "ON"`) console.log(`$env:WHISPER_NO_AVX2 = "ON"`) console.log(`$env:WHISPER_NO_FMA = "ON"`) console.log(`$env:WHISPER_NO_F16C = "ON"`) } - if (process.argv.includes('--cuda')) { + if (hasFeature('cuda')) { console.log(`$env:CUDA_PATH = "${cudaPath}"`) } } @@ -227,13 +240,13 @@ if (process.env.GITHUB_ENV) { console.log('Adding ENV', openblas) await fs.appendFile(process.env.GITHUB_ENV, openblas) - if (process.argv.includes('--opencl')) { + if (hasFeature('opencl')) { const clblast = `CLBlast_DIR=${exports.clblast}\n` console.log('Adding ENV', clblast) await fs.appendFile(process.env.GITHUB_ENV, clblast) } - if (buildForOldCPU) { + if (hasFeature('older-cpu')) { await fs.appendFile(process.env.GITHUB_ENV, `WHISPER_NO_AVX=ON\n`) await fs.appendFile(process.env.GITHUB_ENV, `WHISPER_NO_AVX2=ON\n`) await fs.appendFile(process.env.GITHUB_ENV, `WHISPER_NO_FMA=ON\n`) From 0a53844a6c4356c9b0e2cde006683bc13b241b7b Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 22:50:13 +0300 Subject: [PATCH 13/29] misc --- desktop/src-tauri/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.toml index 668d5a75..17ad77ce 100644 --- a/desktop/src-tauri/Cargo.toml +++ b/desktop/src-tauri/Cargo.toml @@ -48,10 +48,12 @@ crash-handler = "0.6.2" urlencoding = "2.1.3" +# Linux [target.'cfg(target_os = "linux")'.dependencies] vibe_core = { path = "../../core", features = [] } openssl = { version = "0.10.63", features = ["vendored"] } +# Windows [target.'cfg(windows)'.dependencies] vibe_core = { path = "../../core", features = [] } windows = { version = "0.56.0", features = [ @@ -60,6 +62,7 @@ windows = { version = "0.56.0", features = [ ] } winreg = "0.52.0" +# macOS [target.'cfg(target_os = "macos")'.dependencies] vibe_core = { path = "../../core", features = ["coreml", "metal"] } cocoa = "0.25.0" From 5072691e34ab4c7b6e73a4bee8fb5d94eddf090f Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:16:41 +0300 Subject: [PATCH 14/29] fix has feature --- scripts/pre_build.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pre_build.js b/scripts/pre_build.js index d1a3cdb9..7e560610 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -14,7 +14,7 @@ const platform = { const cwd = process.cwd() function hasFeature(name) { - return process.argv.includes(name) + return process.argv.includes(`--${name}`) || process.argv.includes(name) } const config = { From 7f215dc4167ab9835e9d8164ce7a6ec4cb109fc3 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:23:15 +0300 Subject: [PATCH 15/29] improve core test --- .github/workflows/test_core.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index b2294691..c0a4d9c5 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -19,6 +19,8 @@ jobs: args: "" - platform: "windows-latest" # Windows x86_64 args: "--target x86_64-pc-windows-msvc" + - platform: "windows-latest" # Windows x86_64 with opencl + args: '--target x86_64-pc-windows-msvc --features "opencl,openblas"' runs-on: ${{ matrix.platform }} steps: @@ -66,4 +68,4 @@ jobs: - name: Test run: | - cargo test -p vibe_core --release -- --nocapture \ No newline at end of file + cargo test ${{ matrix.args }} -p vibe_core --release -- --nocapture \ No newline at end of file From 2858c441f87a4bfd4f55ee64bd1e29e2d1273b65 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:25:04 +0300 Subject: [PATCH 16/29] rename test job --- .github/workflows/test_core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index c0a4d9c5..0412f7ba 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: jobs: - publish-tauri: + test: permissions: contents: write strategy: From d0302b9db51301139d3da93c302592b525902599 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:38:11 +0300 Subject: [PATCH 17/29] fix test --- .github/workflows/test_core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index 0412f7ba..d5ab9b2f 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -13,7 +13,7 @@ jobs: include: - platform: "macos-latest" # for Arm based macs (M1 and above). args: "--target aarch64-apple-darwin" - - platform: "macos-latest" # for Intel based macs. + - platform: "macos-13" # for Intel based macs. args: "--target x86_64-apple-darwin" - platform: "ubuntu-22.04" # Ubuntu x86_64 args: "" From 681e4186360121fb5b71aa8ac10d3ca0022bb8d5 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:39:24 +0300 Subject: [PATCH 18/29] fix test --- .github/workflows/test_core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index d5ab9b2f..85e83f31 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -46,7 +46,7 @@ jobs: desktop/src-tauri/openblas desktop/src-tauri/clblast desktop/src-tauri/ffmpeg - key: ${{ matrix.platform }}-${{ matrix.args }}-pre-build + key: ${{ matrix.platform }}-pre-build # Run pre build - name: Run pre_build.js on ${{ matrix.platform }} From 9c5854421bc2fadca939add3d12b49b55599e391 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Sun, 14 Jul 2024 23:49:13 +0300 Subject: [PATCH 19/29] fix test for win --- .github/workflows/test_core.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index 85e83f31..e362415f 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -13,14 +13,23 @@ jobs: include: - platform: "macos-latest" # for Arm based macs (M1 and above). args: "--target aarch64-apple-darwin" + pre-build-args: "" + - platform: "macos-13" # for Intel based macs. args: "--target x86_64-apple-darwin" + pre-build-args: "" + - platform: "ubuntu-22.04" # Ubuntu x86_64 args: "" + pre-build-args: "" + - platform: "windows-latest" # Windows x86_64 args: "--target x86_64-pc-windows-msvc" + pre-build-args: "" + - platform: "windows-latest" # Windows x86_64 with opencl args: '--target x86_64-pc-windows-msvc --features "opencl,openblas"' + pre-build-args: "--opencl --openblas" runs-on: ${{ matrix.platform }} steps: @@ -50,7 +59,7 @@ jobs: # Run pre build - name: Run pre_build.js on ${{ matrix.platform }} - run: bun scripts/pre_build.js + run: bun scripts/pre_build.js ${{ matrix.pre-build-args }} - name: Download tiny model on Windows if: contains(matrix.platform, 'windows') From 5111fe901ddbfc8dee81c1fb31aec3d058be122d Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:32:00 +0300 Subject: [PATCH 20/29] improve ci --- .github/workflows/test_core.yml | 58 +++++++++++++++++++++------------ BUILDING.md | 9 +++++ core/build.rs | 1 + scripts/pre_build.js | 5 +-- 4 files changed, 51 insertions(+), 22 deletions(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index e362415f..24402adf 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -10,28 +10,39 @@ jobs: strategy: fail-fast: false matrix: - include: - - platform: "macos-latest" # for Arm based macs (M1 and above). - args: "--target aarch64-apple-darwin" - pre-build-args: "" - - - platform: "macos-13" # for Intel based macs. - args: "--target x86_64-apple-darwin" - pre-build-args: "" - - - platform: "ubuntu-22.04" # Ubuntu x86_64 - args: "" - pre-build-args: "" - - - platform: "windows-latest" # Windows x86_64 - args: "--target x86_64-pc-windows-msvc" - pre-build-args: "" - - - platform: "windows-latest" # Windows x86_64 with opencl - args: '--target x86_64-pc-windows-msvc --features "opencl,openblas"' - pre-build-args: "--opencl --openblas" + include: + - platform: "macos-latest" # for Arm based macs (M1 and above). + args: "--target aarch64-apple-darwin" + pre-build-args: "" + name: "MacOS (Arm) - aarch64" + + - platform: "macos-13" # for Intel based macs. + args: "--target x86_64-apple-darwin" + pre-build-args: "" + name: "MacOS (Intel) - x86_64" + + - platform: "ubuntu-22.04" # Ubuntu x86_64 + args: "" + pre-build-args: "" + name: "Ubuntu 22.04 - x86_64" + + - platform: "windows-latest" # Windows x86_64 + args: "--target x86_64-pc-windows-msvc" + pre-build-args: "" + name: "Windows - x86_64" + + - platform: "windows-latest" # Windows x86_64 with openblas + args: '--target x86_64-pc-windows-msvc --features "openblas"' + pre-build-args: "--openblas" + name: "Windows - x86_64 with OpenBLAS" + + - platform: "windows-latest" # Windows x86_64 with opencl + args: '--target x86_64-pc-windows-msvc --features "openblas,opencl"' + pre-build-args: "--opencl" + name: "Windows - x86_64 with OpenBLAS and OpenCL" runs-on: ${{ matrix.platform }} + name: ${{ matrix.name }} steps: - uses: actions/checkout@v4 @@ -75,6 +86,13 @@ jobs: run: echo "$PWD/desktop/src-tauri/ffmpeg/bin" >> $GITHUB_PATH if: contains(matrix.platform, 'windows') == false + - name: Add openblas and opencl DLLs to path + if: contains(matrix.pre-build-args, 'openblas') || contains(matrix.pre-build-args, 'opencl') + run: | + $env:PATH += ";$env:CLBlast_DIR\..\..\..\bin" + $env:PATH += ";$env:OPENBLAS_PATH\bin" + $env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" + - name: Test run: | cargo test ${{ matrix.args }} -p vibe_core --release -- --nocapture \ No newline at end of file diff --git a/BUILDING.md b/BUILDING.md index 64dff0f1..486dd202 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -206,3 +206,12 @@ cargo +nightly -Zunstable-options update --breaking "rust-analyzer.runnables.extraArgs": ["--release"] } ``` + +## Test core + +```console +$env:PATH += "$env:CLBlast_DIR\..\..\..\bin" +$env:PATH += "$env:OPENBLAS_PATH\bin" +$env:PATH += "C:\vcpkg\packages\opencl_x64-windows\bin" +cargo test --target x86_64-pc-windows-msvc --features "opencl,openblas" -p vibe_core --release -- --nocapture +``` diff --git a/core/build.rs b/core/build.rs index daba942c..463ecfbe 100644 --- a/core/build.rs +++ b/core/build.rs @@ -52,6 +52,7 @@ fn main() { if cfg!(feature = "opencl") { println!("cargo:rustc-link-search={}", clblast_dir.join("..\\..\\").display()); + println!("cargo:rustc-link-search={}", clblast_dir.join("..\\lib").display()); println!("cargo:rustc-link-search=C:\\vcpkg\\packages\\opencl_x64-windows\\lib"); } diff --git a/scripts/pre_build.js b/scripts/pre_build.js index 7e560610..faa4b1af 100755 --- a/scripts/pre_build.js +++ b/scripts/pre_build.js @@ -175,8 +175,6 @@ if (hasFeature('opencl')) { tauriConfig.bundle.resources['clblast\\bin\\*.dll'] = './' tauriConfig.bundle.resources['C:\\vcpkg\\packages\\opencl_x64-windows\\bin\\*.dll'] = './' await fs.writeFile('tauri.windows.conf.json', JSON.stringify(tauriConfig, null, 4)) - - console.log(`$env:CLBlast_DIR = "${exports.clblast}"`) } } @@ -213,6 +211,9 @@ if (!process.env.GITHUB_ENV) { if (hasFeature('cuda')) { console.log(`$env:CUDA_PATH = "${cudaPath}"`) } + if (hasFeature('opencl')) { + console.log(`$env:CLBlast_DIR = "${exports.clblast}"`) + } } if (platform == 'macos') { console.log(`export FFMPEG_DIR="${exports.ffmpeg}"`) From e3d4ec691bf3ae179ccf35204c5be6f1223d098f Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:37:44 +0300 Subject: [PATCH 21/29] misc --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d12abbb..0b15d9ad 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,8 +21,8 @@ jobs: - platform: "ubuntu-22.04" # Ubuntu x86_64 args: "" - platform: "windows-latest" # Windows x86_64 - args: '--target x86_64-pc-windows-msvc --features "opencl,openblas"' - pre-build-args: "--opencl --openblas" + args: '--target x86_64-pc-windows-msvc --features "openblas"' + pre-build-args: "--openblas" runs-on: ${{ matrix.platform }} steps: From f2c12fd4fa095d97d004fe6d6e02a04924ddff7e Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:42:10 +0300 Subject: [PATCH 22/29] misc --- BUILDING.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/BUILDING.md b/BUILDING.md index 486dd202..35678b7d 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -210,8 +210,10 @@ cargo +nightly -Zunstable-options update --breaking ## Test core ```console -$env:PATH += "$env:CLBlast_DIR\..\..\..\bin" -$env:PATH += "$env:OPENBLAS_PATH\bin" -$env:PATH += "C:\vcpkg\packages\opencl_x64-windows\bin" +bun run scripts/pre_build.js +# Export env vars from there +$env:PATH += ";$env:CLBlast_DIR\..\..\..\bin" +$env:PATH += ";$env:OPENBLAS_PATH\bin" +$env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" cargo test --target x86_64-pc-windows-msvc --features "opencl,openblas" -p vibe_core --release -- --nocapture ``` From 1a7a6b0558bebbdba97f35f1137ae0141bd4e27e Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:44:54 +0300 Subject: [PATCH 23/29] fix ci --- .github/workflows/test_core.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index 24402adf..fd280edd 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -37,9 +37,9 @@ jobs: name: "Windows - x86_64 with OpenBLAS" - platform: "windows-latest" # Windows x86_64 with opencl - args: '--target x86_64-pc-windows-msvc --features "openblas,opencl"' + args: '--target x86_64-pc-windows-msvc --features "opencl"' pre-build-args: "--opencl" - name: "Windows - x86_64 with OpenBLAS and OpenCL" + name: "Windows - x86_64 with OpenCL" runs-on: ${{ matrix.platform }} name: ${{ matrix.name }} From b85315ab20a77a0df8d4581320cccd8feec2b6f9 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:48:05 +0300 Subject: [PATCH 24/29] test core on pr --- .github/workflows/test_core.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index fd280edd..bd14454e 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -2,7 +2,12 @@ name: Test Core on: workflow_dispatch: - + pull_request: + paths: + - '.github/workflows/lint.yml' + - 'desktop/src-tauri/**' + - 'cli/src/**' + - 'core/src/**' jobs: test: permissions: From b12ffd159d08803a3a5799eebb329c8e45986411 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 00:59:05 +0300 Subject: [PATCH 25/29] fix win build --- .github/workflows/test_core.yml | 4 ++-- BUILDING.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index bd14454e..770f1987 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -94,8 +94,8 @@ jobs: - name: Add openblas and opencl DLLs to path if: contains(matrix.pre-build-args, 'openblas') || contains(matrix.pre-build-args, 'opencl') run: | - $env:PATH += ";$env:CLBlast_DIR\..\..\..\bin" - $env:PATH += ";$env:OPENBLAS_PATH\bin" + $env:PATH += ";$pwddesktop\src-tauri\clblast\bin" + $env:PATH += ";$pwd\desktop\src-tauri\openblas\bin" $env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" - name: Test diff --git a/BUILDING.md b/BUILDING.md index 35678b7d..72bf2e5e 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -211,9 +211,9 @@ cargo +nightly -Zunstable-options update --breaking ```console bun run scripts/pre_build.js -# Export env vars from there -$env:PATH += ";$env:CLBlast_DIR\..\..\..\bin" -$env:PATH += ";$env:OPENBLAS_PATH\bin" +# Export env +$env:PATH += ";$pwddesktop\src-tauri\clblast\bin" +$env:PATH += ";$pwd\desktop\src-tauri\openblas\bin" $env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" cargo test --target x86_64-pc-windows-msvc --features "opencl,openblas" -p vibe_core --release -- --nocapture ``` From 0f79d37b407037e80884fe4b0fd564e7fdbba1f5 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 01:02:50 +0300 Subject: [PATCH 26/29] improve test core --- .github/workflows/test_core.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index 770f1987..d7a522af 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -20,31 +20,37 @@ jobs: args: "--target aarch64-apple-darwin" pre-build-args: "" name: "MacOS (Arm) - aarch64" + action: "test" - platform: "macos-13" # for Intel based macs. args: "--target x86_64-apple-darwin" pre-build-args: "" name: "MacOS (Intel) - x86_64" + action: "test" - platform: "ubuntu-22.04" # Ubuntu x86_64 args: "" pre-build-args: "" name: "Ubuntu 22.04 - x86_64" + action: "test" - platform: "windows-latest" # Windows x86_64 args: "--target x86_64-pc-windows-msvc" pre-build-args: "" name: "Windows - x86_64" + action: "test" - platform: "windows-latest" # Windows x86_64 with openblas args: '--target x86_64-pc-windows-msvc --features "openblas"' pre-build-args: "--openblas" name: "Windows - x86_64 with OpenBLAS" + action: "test" - platform: "windows-latest" # Windows x86_64 with opencl args: '--target x86_64-pc-windows-msvc --features "opencl"' pre-build-args: "--opencl" name: "Windows - x86_64 with OpenCL" + action: "test" runs-on: ${{ matrix.platform }} name: ${{ matrix.name }} @@ -98,6 +104,13 @@ jobs: $env:PATH += ";$pwd\desktop\src-tauri\openblas\bin" $env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" + + - name: Build + if: matrix.action == 'build' + run: | + cargo build ${{ matrix.args }} -p vibe_core --release + - name: Test + if: matrix.action == 'test' run: | cargo test ${{ matrix.args }} -p vibe_core --release -- --nocapture \ No newline at end of file From 4dce86d79edf35379c37cde1ad776767f8571f00 Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 01:07:52 +0300 Subject: [PATCH 27/29] append to github path --- .github/workflows/test_core.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_core.yml b/.github/workflows/test_core.yml index d7a522af..1256a1a0 100644 --- a/.github/workflows/test_core.yml +++ b/.github/workflows/test_core.yml @@ -100,9 +100,9 @@ jobs: - name: Add openblas and opencl DLLs to path if: contains(matrix.pre-build-args, 'openblas') || contains(matrix.pre-build-args, 'opencl') run: | - $env:PATH += ";$pwddesktop\src-tauri\clblast\bin" - $env:PATH += ";$pwd\desktop\src-tauri\openblas\bin" - $env:PATH += ";C:\vcpkg\packages\opencl_x64-windows\bin" + echo "$PWD/desktop/src-tauri/clblast/bin" >> $env:GITHUB_PATH + echo "$PWD/desktop/src-tauri/openblas/bin" >> $env:GITHUB_PATH + echo "C:/vcpkg/packages/opencl_x64-windows/bin" >> $env:GITHUB_PATH - name: Build From 245b123ba9d828b674630e1a4d4fce4851064f8e Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 02:02:55 +0300 Subject: [PATCH 28/29] disable opencl --- .github/workflows/windows_special.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/windows_special.yml b/.github/workflows/windows_special.yml index 465dc41b..ceecbf1d 100644 --- a/.github/workflows/windows_special.yml +++ b/.github/workflows/windows_special.yml @@ -17,8 +17,8 @@ jobs: include: # Windows no AVX2 - platform: "windows-latest" - args: '--features="opencl"' - pre-build-args: "--older-cpu --opencl --openblas" + args: '--features="openblas"' + pre-build-args: "--older-cpu --openblas" rust-version: "stable" # Windows cuda 12.5.0 @@ -32,22 +32,22 @@ jobs: # Windows cuda 11.8.0 - platform: "windows-latest" args: '--features="cuda,openblas"' - pre-build-args: "--cuda" + pre-build-args: "--cuda --openblas" name: 'cuda-11.8.0' cuda-verison: '11.8.0' rust-version: "stable" - # Windows portable with opencl + # Windows portable - platform: "windows-latest" # Windows x86_64 - args: '--features="opencl,openblas"' - pre-build-args: "--portable --opencl --openblas" + args: '--features="openblas"' + pre-build-args: "--portable --openblas" name: portable rust-version: "stable" - # Windows7 portable with opencl + # Windows7 portable - platform: "windows-latest" # Windows x86_64 - args: '--features="opencl,openblas"' - pre-build-args: "--portable --opencl --openblas" + args: '--features="openblas"' + pre-build-args: "--portable --openblas" name: portable-win7 rust-version: "1.75" From 7da9c013b8f010ff42b4770855f248464e39f29d Mon Sep 17 00:00:00 2001 From: thewh1teagle <61390950+thewh1teagle@users.noreply.github.com> Date: Mon, 15 Jul 2024 02:11:01 +0300 Subject: [PATCH 29/29] try to fix release --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b15d9ad..b1d98103 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,7 +18,7 @@ jobs: args: "--target aarch64-apple-darwin" - platform: "macos-latest" # for Intel based macs. args: "--target x86_64-apple-darwin" - - platform: "ubuntu-22.04" # Ubuntu x86_64 + - platform: "ubuntu-24.04" # Ubuntu x86_64 args: "" - platform: "windows-latest" # Windows x86_64 args: '--target x86_64-pc-windows-msvc --features "openblas"'