-
Notifications
You must be signed in to change notification settings - Fork 7
97 lines (81 loc) · 2.65 KB
/
ci.yml
File metadata and controls
97 lines (81 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: Windows CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
env:
PYTHON_VERSION: '3.11'
NODE_VERSION: '18'
jobs:
test-build-windows:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Create Python virtual environment
run: |
cd backend
python -m venv venv
- name: Install backend requirements
run: |
cd backend
.\venv\Scripts\activate
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Test backend build
run: |
cd backend
.\venv\Scripts\activate
python -m PyInstaller backend_server.spec
- name: Install frontend requirements
run: |
cd frontend
npx rimraf node_modules
pnpm install --force
- name: Copy backend executable
run: |
copy backend\dist\backend_server.exe frontend\src-tauri\backend_server-x86_64-pc-windows-msvc.exe
- name: Test frontend build
run: |
cd frontend
pnpm run build
- name: Test Tauri build (debug)
run: |
cd frontend
# Disable updater artifacts and resources to avoid signing/missing files in CI
Write-Output "Disabling createUpdaterArtifacts for CI build..."
$configPath = "src-tauri/tauri.conf.json"
$json = Get-Content $configPath -Raw | ConvertFrom-Json
$updated = $false
if ($json.bundle -and $json.bundle.createUpdaterArtifacts) {
$json.bundle.createUpdaterArtifacts = $false
$updated = $true
}
if ($json.bundle -and $json.bundle.resources) {
$json.bundle.resources = @()
$updated = $true
}
if ($json.plugins -and $json.plugins.updater) {
$json.plugins.PSObject.Properties.Remove('updater')
$updated = $true
}
if ($updated) {
$json | ConvertTo-Json -Depth 20 | Set-Content $configPath
Write-Output "Updated tauri.conf.json to disable signing, resources, and updater config."
}
pnpm run tauri build --debug