- sidecar 슬림화: torch/pyannote 제거, ctranslate2 GPU 감지, /diarize 삭제 - Ollama 번들: resources/ollama/에 포터블 바이너리 배치, LocalLLMService 1순위 탐색 - installer.nsh: VC++ 재배포 x64 자동 다운로드(aka.ms 경유) + 사일런트 설치 - electron-builder: extraResources에 ollama 추가, nsis.include로 installer.nsh 연결 - scripts: download-ollama.ps1/sh 신규 - LLM.PULL_MODEL IPC 핸들러 + LocalLLMService.pullModel() 구현 (api/pull 스트리밍) - 온보딩 모달: gemma4:e4b 미설치 감지 시 자동 표시, 진행률 UI, i18n(ko/en) 키 추가 - .gitlab-ci.yml: Windows 러너에서 sidecar/sox/ollama 준비 후 NSIS 패키징, 태그 시 Release 자동 생성
138 lines
5.3 KiB
YAML
138 lines
5.3 KiB
YAML
stages:
|
|
- check
|
|
- test
|
|
- prepare
|
|
- build
|
|
- package
|
|
- release
|
|
|
|
variables:
|
|
NODE_VERSION: "20"
|
|
PYTHON_VERSION: "3.11"
|
|
OLLAMA_VERSION: "v0.5.7"
|
|
npm_config_cache: "$CI_PROJECT_DIR/.npm"
|
|
|
|
.node-cache: &node-cache
|
|
cache:
|
|
key:
|
|
files:
|
|
- package-lock.json
|
|
paths:
|
|
- .npm/
|
|
- node_modules/
|
|
|
|
# ────────────────────────────────────────────────────────────────────
|
|
# Check
|
|
# ────────────────────────────────────────────────────────────────────
|
|
lint:
|
|
stage: check
|
|
image: node:${NODE_VERSION}
|
|
<<: *node-cache
|
|
before_script:
|
|
- npm ci --ignore-scripts
|
|
script:
|
|
- npm run lint
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
typecheck:
|
|
stage: check
|
|
image: node:${NODE_VERSION}
|
|
<<: *node-cache
|
|
before_script:
|
|
- npm ci --ignore-scripts
|
|
script:
|
|
- npm run typecheck
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
- if: $CI_COMMIT_TAG
|
|
|
|
# ────────────────────────────────────────────────────────────────────
|
|
# Test
|
|
# ────────────────────────────────────────────────────────────────────
|
|
unit-test:
|
|
stage: test
|
|
image: node:${NODE_VERSION}
|
|
<<: *node-cache
|
|
before_script:
|
|
- npm ci --ignore-scripts
|
|
script:
|
|
- npm run test:unit
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
|
|
# ────────────────────────────────────────────────────────────────────
|
|
# Package Windows (태그 푸시 또는 수동 트리거 시만 실행)
|
|
# - PyInstaller sidecar 빌드 → SoX/Ollama 다운로드 → electron-builder --win
|
|
# - Windows self-hosted runner 필요 (native 모듈 + PyInstaller 네이티브 빌드)
|
|
# ────────────────────────────────────────────────────────────────────
|
|
package-windows:
|
|
stage: package
|
|
tags:
|
|
- windows
|
|
- shell # self-hosted Windows runner (shell executor)
|
|
variables:
|
|
CI_RUNNER_PROTECTED: "false"
|
|
before_script:
|
|
# Node 20 + Python 3.11이 러너에 사전 설치되어 있어야 함
|
|
- node --version
|
|
- python --version
|
|
- npm ci
|
|
script:
|
|
# 1) Python sidecar 의존성 설치 + PyInstaller 빌드
|
|
- python -m pip install --upgrade pip
|
|
- python -m pip install pyinstaller
|
|
- python -m pip install -r apps/desktop/sidecar/requirements.txt
|
|
- python apps/desktop/scripts/build-sidecar.py
|
|
# 2) SoX 다운로드
|
|
- powershell -ExecutionPolicy Bypass -File apps/desktop/scripts/download-sox.ps1
|
|
# 3) Ollama 다운로드
|
|
- powershell -ExecutionPolicy Bypass -File apps/desktop/scripts/download-ollama.ps1
|
|
# 4) electron-vite 빌드 + electron-builder NSIS 패키징
|
|
- npm run build --workspace=@d3ro/desktop
|
|
- npm run dist --workspace=@d3ro/desktop
|
|
artifacts:
|
|
name: "d3ro-voice-windows-${CI_COMMIT_SHORT_SHA}"
|
|
paths:
|
|
- apps/desktop/release/
|
|
expire_in: 90 days
|
|
expose_as: "Windows Installer"
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/
|
|
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
|
|
when: manual
|
|
allow_failure: true
|
|
|
|
# ────────────────────────────────────────────────────────────────────
|
|
# Release (태그 시 GitLab Releases 페이지에 자동 첨부)
|
|
# ────────────────────────────────────────────────────────────────────
|
|
release-create:
|
|
stage: release
|
|
image: registry.gitlab.com/gitlab-org/release-cli:latest
|
|
needs:
|
|
- job: package-windows
|
|
artifacts: true
|
|
script:
|
|
- echo "Creating GitLab Release for tag $CI_COMMIT_TAG"
|
|
release:
|
|
name: "D3RO Voice $CI_COMMIT_TAG"
|
|
tag_name: "$CI_COMMIT_TAG"
|
|
description: |
|
|
## D3RO Voice $CI_COMMIT_TAG
|
|
|
|
Windows 설치 파일은 **Job artifacts**에서 다운로드하거나 아래 링크에서 받을 수 있습니다.
|
|
|
|
- 기본 LLM 모델: `gemma4:e4b` (첫 실행 시 자동 다운로드, ~9.6GB)
|
|
- Whisper 모델: `large-v3` (첫 실행 시 자동 다운로드, ~3GB)
|
|
- VC++ 재배포 패키지 선행 설치 필요 (설치 마법사에서 안내)
|
|
assets:
|
|
links:
|
|
- name: "Windows Installer (artifacts)"
|
|
url: "$CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_TAG/browse/apps/desktop/release?job=package-windows"
|
|
link_type: package
|
|
rules:
|
|
- if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+/
|