mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:59:48 +00:00
Improved Rust setup & customized Tauri bundle per platform
This commit is contained in:
parent
6c8d989e17
commit
10096380cb
43
.github/workflows/build-and-release.yml
vendored
43
.github/workflows/build-and-release.yml
vendored
@ -14,16 +14,19 @@ jobs:
|
|||||||
rust_target: 'aarch64-apple-darwin'
|
rust_target: 'aarch64-apple-darwin'
|
||||||
dotnet_runtime: 'osx-arm64'
|
dotnet_runtime: 'osx-arm64'
|
||||||
dotnet_name_postfix: '-aarch64-apple-darwin'
|
dotnet_name_postfix: '-aarch64-apple-darwin'
|
||||||
|
tauri_bundle: 'dmg'
|
||||||
|
|
||||||
- platform: 'macos-latest' # for Intel-based macOS
|
- platform: 'macos-latest' # for Intel-based macOS
|
||||||
rust_target: 'x86_64-apple-darwin'
|
rust_target: 'x86_64-apple-darwin'
|
||||||
dotnet_runtime: 'osx-x64'
|
dotnet_runtime: 'osx-x64'
|
||||||
dotnet_name_postfix: '-x86_64-apple-darwin'
|
dotnet_name_postfix: '-x86_64-apple-darwin'
|
||||||
|
tauri_bundle: 'dmg'
|
||||||
|
|
||||||
- platform: 'ubuntu-22.04' # for x86-based linux
|
- platform: 'ubuntu-22.04' # for x86-based linux
|
||||||
rust_target: 'x86_64-unknown-linux-gnu'
|
rust_target: 'x86_64-unknown-linux-gnu'
|
||||||
dotnet_runtime: 'linux-x64'
|
dotnet_runtime: 'linux-x64'
|
||||||
dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
|
dotnet_name_postfix: '-x86_64-unknown-linux-gnu'
|
||||||
|
tauri_bundle: 'appimage deb'
|
||||||
#
|
#
|
||||||
# Issue https://github.com/twistedfall/opencv-rust/issues/457
|
# Issue https://github.com/twistedfall/opencv-rust/issues/457
|
||||||
#
|
#
|
||||||
@ -31,16 +34,19 @@ jobs:
|
|||||||
# rust_target: 'aarch64-unknown-linux-gnu'
|
# rust_target: 'aarch64-unknown-linux-gnu'
|
||||||
# dotnet_runtime: 'linux-arm64'
|
# dotnet_runtime: 'linux-arm64'
|
||||||
# dotnet_name_postfix: '-aarch64-unknown-linux-gnu'
|
# dotnet_name_postfix: '-aarch64-unknown-linux-gnu'
|
||||||
|
# tauri_bundle: 'appimage deb'
|
||||||
|
|
||||||
- platform: 'windows-latest' # for x86-based windows
|
- platform: 'windows-latest' # for x86-based windows
|
||||||
rust_target: 'x86_64-pc-windows-msvc'
|
rust_target: 'x86_64-pc-windows-msvc'
|
||||||
dotnet_runtime: 'win-x64'
|
dotnet_runtime: 'win-x64'
|
||||||
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
|
dotnet_name_postfix: '-x86_64-pc-windows-msvc.exe'
|
||||||
|
taui_bundle: 'msi nsis'
|
||||||
|
|
||||||
- platform: 'windows-latest' # for ARM-based windows
|
- platform: 'windows-latest' # for ARM-based windows
|
||||||
rust_target: 'aarch64-pc-windows-msvc'
|
rust_target: 'aarch64-pc-windows-msvc'
|
||||||
dotnet_runtime: 'win-arm64'
|
dotnet_runtime: 'win-arm64'
|
||||||
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
|
dotnet_name_postfix: '-aarch64-pc-windows-msvc.exe'
|
||||||
|
tauri_bundle: 'nsis'
|
||||||
|
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
@ -76,41 +82,10 @@ jobs:
|
|||||||
cd publish/dotnet
|
cd publish/dotnet
|
||||||
mv mindworkAIStudio.exe "../../app/MindWork AI Studio/bin/dist/mindworkAIStudio${{ matrix.dotnet_name_postfix }}"
|
mv mindworkAIStudio.exe "../../app/MindWork AI Studio/bin/dist/mindworkAIStudio${{ matrix.dotnet_name_postfix }}"
|
||||||
|
|
||||||
- name: Setup Rust stable (ARM macOS)
|
- name: Setup Rust stable
|
||||||
if: matrix.platform == 'macos-latest' && matrix.rust_target == 'aarch64-apple-darwin'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
targets: 'aarch64-apple-darwin'
|
targets: ${{ matrix.rust_target }}
|
||||||
|
|
||||||
- name: Setup Rust stable (Intel macOS)
|
|
||||||
if: matrix.platform == 'macos-latest' && matrix.rust_target == 'x86_64-apple-darwin'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: 'x86_64-apple-darwin'
|
|
||||||
|
|
||||||
- name: Setup Rust stable (x86 linux)
|
|
||||||
if: matrix.platform == 'ubuntu-22.04' && matrix.rust_target == 'x86_64-unknown-linux-gnu'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: 'x86_64-unknown-linux-gnu'
|
|
||||||
|
|
||||||
- name: Setup Rust stable (ARM linux)
|
|
||||||
if: matrix.platform == 'ubuntu-22.04' && matrix.rust_target == 'aarch64-unknown-linux-gnu'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: 'aarch64-unknown-linux-gnu'
|
|
||||||
|
|
||||||
- name: Setup Rust stable (x86 Windows)
|
|
||||||
if: matrix.platform == 'windows-latest' && matrix.rust_target == 'x86_64-pc-windows-msvc'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: 'x86_64-pc-windows-msvc'
|
|
||||||
|
|
||||||
- name: Setup Rust stable (ARM Windows)
|
|
||||||
if: matrix.platform == 'windows-latest' && matrix.rust_target == 'aarch64-pc-windows-msvc'
|
|
||||||
uses: dtolnay/rust-toolchain@stable
|
|
||||||
with:
|
|
||||||
targets: 'aarch64-pc-windows-msvc'
|
|
||||||
|
|
||||||
- name: Setup dependencies (Ubuntu-specific)
|
- name: Setup dependencies (Ubuntu-specific)
|
||||||
if: matrix.platform == 'ubuntu-22.04'
|
if: matrix.platform == 'ubuntu-22.04'
|
||||||
@ -126,7 +101,7 @@ jobs:
|
|||||||
- name: Build Tauri project
|
- name: Build Tauri project
|
||||||
run: |
|
run: |
|
||||||
cd runtime
|
cd runtime
|
||||||
cargo tauri build --target ${{ matrix.rust_target }}
|
cargo tauri build --target ${{ matrix.rust_target }} --bundle ${{ matrix.tauri_bundle }}
|
||||||
|
|
||||||
- name: Upload artifact (macOS)
|
- name: Upload artifact (macOS)
|
||||||
if: startsWith(matrix.platform, 'macos')
|
if: startsWith(matrix.platform, 'macos')
|
||||||
|
Loading…
Reference in New Issue
Block a user