mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-04-28 15:19:46 +00:00
Enhanced possibility to skip long-running linux ARM build
This commit is contained in:
parent
3633634ba5
commit
eaf6bd68ee
18
.github/workflows/build-and-release.yml
vendored
18
.github/workflows/build-and-release.yml
vendored
@ -394,7 +394,8 @@ jobs:
|
|||||||
name: Build app (linux-arm64)
|
name: Build app (linux-arm64)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: read_metadata
|
needs: read_metadata
|
||||||
if: true # allows disabling this long-running job temporarily
|
env:
|
||||||
|
SKIP: true # allows disabling this long-running job temporarily
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@ -403,6 +404,7 @@ jobs:
|
|||||||
lfs: false
|
lfs: false
|
||||||
|
|
||||||
- name: Read and format metadata
|
- name: Read and format metadata
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
id: metadata
|
id: metadata
|
||||||
run: |
|
run: |
|
||||||
# Read the lines of the metadata file:
|
# Read the lines of the metadata file:
|
||||||
@ -456,6 +458,7 @@ jobs:
|
|||||||
echo "Tauri version: '${tauri_version}'"
|
echo "Tauri version: '${tauri_version}'"
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
uses: actions/setup-dotnet@v4
|
uses: actions/setup-dotnet@v4
|
||||||
with:
|
with:
|
||||||
dotnet-version: ${{ env.DOTNET_SDK_VERSI }}
|
dotnet-version: ${{ env.DOTNET_SDK_VERSI }}
|
||||||
@ -463,22 +466,26 @@ jobs:
|
|||||||
cache-dependency-path: 'app/MindWork AI Studio/packages.lock.json'
|
cache-dependency-path: 'app/MindWork AI Studio/packages.lock.json'
|
||||||
|
|
||||||
- name: Build .NET project
|
- name: Build .NET project
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
cd "app/MindWork AI Studio"
|
cd "app/MindWork AI Studio"
|
||||||
dotnet publish --configuration release --runtime linux-arm64 --disable-build-servers --force --output ../../publish/dotnet
|
dotnet publish --configuration release --runtime linux-arm64 --disable-build-servers --force --output ../../publish/dotnet
|
||||||
|
|
||||||
- name: Move & rename the .NET artifact
|
- name: Move & rename the .NET artifact
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "app/MindWork AI Studio/bin/dist"
|
mkdir -p "app/MindWork AI Studio/bin/dist"
|
||||||
cd publish/dotnet
|
cd publish/dotnet
|
||||||
mv mindworkAIStudio "../../app/MindWork AI Studio/bin/dist/mindworkAIStudioServer-aarch64-unknown-linux-gnu"
|
mv mindworkAIStudio "../../app/MindWork AI Studio/bin/dist/mindworkAIStudioServer-aarch64-unknown-linux-gnu"
|
||||||
|
|
||||||
- name: Create parts for the Rust cache key
|
- name: Create parts for the Rust cache key
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
cd runtime
|
cd runtime
|
||||||
echo "CARGO_LOCK_HASH=${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_ENV
|
echo "CARGO_LOCK_HASH=${{ hashFiles('**/Cargo.lock') }}" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Cache linux arm64 runner image
|
- name: Cache linux arm64 runner image
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
id: linux_arm_cache
|
id: linux_arm_cache
|
||||||
with:
|
with:
|
||||||
@ -499,7 +506,7 @@ jobs:
|
|||||||
- name: Build linux arm runner image
|
- name: Build linux arm runner image
|
||||||
uses: pguyot/arm-runner-action@v2
|
uses: pguyot/arm-runner-action@v2
|
||||||
id: build-linux-arm-runner
|
id: build-linux-arm-runner
|
||||||
if: steps.linux_arm_cache.outputs.cache-hit != 'true'
|
if: ${{ steps.linux_arm_cache.outputs.cache-hit != 'true' && env.SKIP != 'true' }}
|
||||||
env:
|
env:
|
||||||
RUST_VERSION: ${{ env.RUST_VERSION }}
|
RUST_VERSION: ${{ env.RUST_VERSION }}
|
||||||
TAURI_VERSION: ${{ env.TAURI_VERSION }}
|
TAURI_VERSION: ${{ env.TAURI_VERSION }}
|
||||||
@ -535,13 +542,15 @@ jobs:
|
|||||||
cargo install tauri-cli
|
cargo install tauri-cli
|
||||||
|
|
||||||
- name: Add the built runner image to the cache
|
- name: Add the built runner image to the cache
|
||||||
if: steps.linux_arm_cache.outputs.cache-hit != 'true'
|
if: ${{ steps.linux_arm_cache.outputs.cache-hit != 'true' && env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
mv ${{ steps.build-linux-arm-runner.outputs.image }} $RUNNER_TEMP/linux_arm_qemu_cache.img
|
mv ${{ steps.build-linux-arm-runner.outputs.image }} $RUNNER_TEMP/linux_arm_qemu_cache.img
|
||||||
|
|
||||||
- name: Build Tauri project
|
- name: Build Tauri project
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
uses: pguyot/arm-runner-action@v2
|
uses: pguyot/arm-runner-action@v2
|
||||||
id: build-linux-arm
|
id: build-linux-arm
|
||||||
|
|
||||||
with:
|
with:
|
||||||
base_image: file://$RUNNER_TEMP/linux_arm_qemu_cache.img
|
base_image: file://$RUNNER_TEMP/linux_arm_qemu_cache.img
|
||||||
cpu: cortex-a53
|
cpu: cortex-a53
|
||||||
@ -567,6 +576,7 @@ jobs:
|
|||||||
cargo tauri build --target aarch64-unknown-linux-gnu --bundles deb
|
cargo tauri build --target aarch64-unknown-linux-gnu --bundles deb
|
||||||
|
|
||||||
- name: Debug
|
- name: Debug
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
echo "Current directory: $(pwd)"
|
echo "Current directory: $(pwd)"
|
||||||
ls -lhat
|
ls -lhat
|
||||||
@ -578,10 +588,12 @@ jobs:
|
|||||||
find . -name 'mind-work-ai-studio_*.deb' -print 2>/dev/null
|
find . -name 'mind-work-ai-studio_*.deb' -print 2>/dev/null
|
||||||
|
|
||||||
- name: Update the runner image to cache the Rust runtime build
|
- name: Update the runner image to cache the Rust runtime build
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
run: |
|
run: |
|
||||||
mv ${{ steps.build-linux-arm.outputs.image }} $RUNNER_TEMP/linux_arm_qemu_cache.img
|
mv ${{ steps.build-linux-arm.outputs.image }} $RUNNER_TEMP/linux_arm_qemu_cache.img
|
||||||
|
|
||||||
- name: Upload artifact (Linux - Debian Package)
|
- name: Upload artifact (Linux - Debian Package)
|
||||||
|
if: ${{ env.SKIP != 'true' }}
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: MindWork AI Studio (Linux - deb linux-arm64)
|
name: MindWork AI Studio (Linux - deb linux-arm64)
|
||||||
|
Loading…
Reference in New Issue
Block a user