minor fixes on windows ci tester #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |