|
50 | 50 | contents: write |
51 | 51 | runs-on: ${{ inputs.platform }} |
52 | 52 | steps: |
| 53 | + - name: Enable long paths (Windows) |
| 54 | + if: runner.os == 'Windows' |
| 55 | + shell: pwsh |
| 56 | + run: | |
| 57 | + New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" ` |
| 58 | + -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force |
| 59 | + git config --system core.longpaths true |
| 60 | +
|
53 | 61 | - name: Checkout repository |
54 | 62 | uses: actions/checkout@v4 |
55 | 63 | with: |
@@ -254,15 +262,6 @@ jobs: |
254 | 262 | fi |
255 | 263 | echo "platform=${patched_platform}" >> $GITHUB_OUTPUT |
256 | 264 |
|
257 | | - # whisper-rs-sys CMake builds create deeply nested paths that exceed |
258 | | - # Windows MAX_PATH (260 chars). Use a short target dir so all build |
259 | | - # artifact paths stay under the limit. Set after cargo install steps |
260 | | - # so it only affects the main build. |
261 | | - - name: Shorten build path (Windows) |
262 | | - if: runner.os == 'Windows' |
263 | | - shell: pwsh |
264 | | - run: echo "CARGO_TARGET_DIR=D:\a\ct" >> $env:GITHUB_ENV |
265 | | - |
266 | 265 | - name: Build with Tauri |
267 | 266 | uses: tauri-apps/tauri-action@v0 |
268 | 267 | env: |
@@ -371,9 +370,8 @@ jobs: |
371 | 370 | uses: actions/upload-artifact@v4 |
372 | 371 | with: |
373 | 372 | name: ${{ inputs.asset-prefix }}-${{ inputs.target }} |
374 | | - # CARGO_TARGET_DIR is set to D:\t on Windows to avoid MAX_PATH issues. |
375 | 373 | # Default Windows builds place bundles under release/, but cross-compiles (ARM64) nest under target/<triple>/release. |
376 | 374 | path: | |
377 | | - D:\a\ct\${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}\bundle\msi\*.msi |
378 | | - D:\a\ct\${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}\bundle\nsis\*.exe |
| 375 | + src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/msi/*.msi |
| 376 | + src-tauri/target/${{ inputs.target != '' && inputs.target != 'x86_64-pc-windows-msvc' && format('{0}/{1}', inputs.target, steps.build-profile.outputs.profile) || steps.build-profile.outputs.profile }}/bundle/nsis/*.exe |
379 | 377 | retention-days: 30 |
0 commit comments