fix: move CI workflow to repo root and update paths
Gitea Actions requires .gitea/workflows/ at repo root. Updated all paths to use edge-ai-platform/ prefix. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
74fb9ce6aa
commit
0b00bc82e4
@ -6,6 +6,9 @@ on:
|
||||
- 'v*'
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
WORK_DIR: edge-ai-platform
|
||||
|
||||
jobs:
|
||||
build-macos:
|
||||
runs-on: macos-latest
|
||||
@ -29,32 +32,32 @@ jobs:
|
||||
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: cd frontend && pnpm install --frozen-lockfile
|
||||
run: cd $WORK_DIR/frontend && pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build frontend
|
||||
run: make build-frontend build-embed
|
||||
run: cd $WORK_DIR && make build-frontend build-embed
|
||||
|
||||
- name: Build server (tray-enabled)
|
||||
run: make build-server-tray
|
||||
run: cd $WORK_DIR && make build-server-tray
|
||||
|
||||
- name: Stage installer payload
|
||||
run: make installer-payload
|
||||
run: cd $WORK_DIR && make installer-payload
|
||||
|
||||
- name: Build macOS installer
|
||||
run: |
|
||||
cd installer && wails build -clean
|
||||
cd $WORK_DIR/installer && wails build -clean
|
||||
codesign --force --deep --sign - build/bin/EdgeAI-Installer.app
|
||||
|
||||
- name: Package macOS installer
|
||||
run: |
|
||||
cd installer/build/bin
|
||||
cd $WORK_DIR/installer/build/bin
|
||||
ditto -c -k --sequesterRsrc --keepParent EdgeAI-Installer.app EdgeAI-Installer-macOS.zip
|
||||
|
||||
- name: Upload macOS artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: EdgeAI-Installer-macOS
|
||||
path: installer/build/bin/EdgeAI-Installer-macOS.zip
|
||||
path: ${{ env.WORK_DIR }}/installer/build/bin/EdgeAI-Installer-macOS.zip
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
@ -78,51 +81,52 @@ jobs:
|
||||
run: go install github.com/wailsapp/wails/v2/cmd/wails@latest
|
||||
|
||||
- name: Install frontend dependencies
|
||||
run: cd frontend && pnpm install --frozen-lockfile
|
||||
run: cd edge-ai-platform\frontend && pnpm install --frozen-lockfile
|
||||
|
||||
- name: Build frontend
|
||||
run: |
|
||||
cd frontend && pnpm build
|
||||
cd edge-ai-platform\frontend && pnpm build
|
||||
xcopy /E /I /Y out ..\server\web\out
|
||||
|
||||
- name: Build server (no tray on Windows CI)
|
||||
run: |
|
||||
cd server
|
||||
cd edge-ai-platform\server
|
||||
$env:CGO_ENABLED="0"
|
||||
go build -tags notray -ldflags="-s -w" -o ..\dist\edge-ai-server.exe main.go
|
||||
|
||||
- name: Stage installer payload
|
||||
run: |
|
||||
Remove-Item -Recurse -Force installer\payload -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Force -Path installer\payload\data\nef\kl520
|
||||
New-Item -ItemType Directory -Force -Path installer\payload\data\nef\kl720
|
||||
New-Item -ItemType Directory -Force -Path installer\payload\scripts\firmware\KL520
|
||||
New-Item -ItemType Directory -Force -Path installer\payload\scripts\firmware\KL720
|
||||
Copy-Item dist\edge-ai-server.exe installer\payload\
|
||||
Copy-Item server\data\models.json installer\payload\data\
|
||||
Copy-Item server\data\nef\kl520\*.nef installer\payload\data\nef\kl520\
|
||||
Copy-Item server\data\nef\kl720\*.nef installer\payload\data\nef\kl720\
|
||||
Copy-Item server\scripts\kneron_bridge.py installer\payload\scripts\
|
||||
Copy-Item server\scripts\requirements.txt installer\payload\scripts\
|
||||
Copy-Item server\scripts\update_kl720_firmware.py installer\payload\scripts\
|
||||
Copy-Item scripts\kneron_detect.py installer\payload\scripts\
|
||||
Copy-Item server\scripts\firmware\KL520\*.bin installer\payload\scripts\firmware\KL520\
|
||||
Copy-Item server\scripts\firmware\KL720\*.bin installer\payload\scripts\firmware\KL720\
|
||||
$base = "edge-ai-platform"
|
||||
Remove-Item -Recurse -Force "$base\installer\payload" -ErrorAction SilentlyContinue
|
||||
New-Item -ItemType Directory -Force -Path "$base\installer\payload\data\nef\kl520"
|
||||
New-Item -ItemType Directory -Force -Path "$base\installer\payload\data\nef\kl720"
|
||||
New-Item -ItemType Directory -Force -Path "$base\installer\payload\scripts\firmware\KL520"
|
||||
New-Item -ItemType Directory -Force -Path "$base\installer\payload\scripts\firmware\KL720"
|
||||
Copy-Item "$base\dist\edge-ai-server.exe" "$base\installer\payload\"
|
||||
Copy-Item "$base\server\data\models.json" "$base\installer\payload\data\"
|
||||
Copy-Item "$base\server\data\nef\kl520\*.nef" "$base\installer\payload\data\nef\kl520\"
|
||||
Copy-Item "$base\server\data\nef\kl720\*.nef" "$base\installer\payload\data\nef\kl720\"
|
||||
Copy-Item "$base\server\scripts\kneron_bridge.py" "$base\installer\payload\scripts\"
|
||||
Copy-Item "$base\server\scripts\requirements.txt" "$base\installer\payload\scripts\"
|
||||
Copy-Item "$base\server\scripts\update_kl720_firmware.py" "$base\installer\payload\scripts\"
|
||||
Copy-Item "$base\scripts\kneron_detect.py" "$base\installer\payload\scripts\"
|
||||
Copy-Item "$base\server\scripts\firmware\KL520\*.bin" "$base\installer\payload\scripts\firmware\KL520\"
|
||||
Copy-Item "$base\server\scripts\firmware\KL720\*.bin" "$base\installer\payload\scripts\firmware\KL720\"
|
||||
|
||||
- name: Build Windows installer
|
||||
run: |
|
||||
cd installer
|
||||
cd edge-ai-platform\installer
|
||||
wails build -clean
|
||||
|
||||
- name: Package Windows installer
|
||||
run: |
|
||||
Compress-Archive -Path installer\build\bin\EdgeAI-Installer.exe -DestinationPath installer\build\bin\EdgeAI-Installer-Windows.zip
|
||||
Compress-Archive -Path edge-ai-platform\installer\build\bin\EdgeAI-Installer.exe -DestinationPath edge-ai-platform\installer\build\bin\EdgeAI-Installer-Windows.zip
|
||||
|
||||
- name: Upload Windows artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: EdgeAI-Installer-Windows
|
||||
path: installer/build/bin/EdgeAI-Installer-Windows.zip
|
||||
path: edge-ai-platform/installer/build/bin/EdgeAI-Installer-Windows.zip
|
||||
|
||||
release:
|
||||
needs: [build-macos, build-windows]
|
||||
Loading…
x
Reference in New Issue
Block a user