Skip to content

Commit 7392a3f

Browse files
committed
long path support
1 parent 1c72172 commit 7392a3f

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,14 @@ jobs:
5050
contents: write
5151
runs-on: ${{ inputs.platform }}
5252
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+
5361
- name: Checkout repository
5462
uses: actions/checkout@v4
5563
with:
@@ -254,15 +262,6 @@ jobs:
254262
fi
255263
echo "platform=${patched_platform}" >> $GITHUB_OUTPUT
256264
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-
266265
- name: Build with Tauri
267266
uses: tauri-apps/tauri-action@v0
268267
env:
@@ -371,9 +370,8 @@ jobs:
371370
uses: actions/upload-artifact@v4
372371
with:
373372
name: ${{ inputs.asset-prefix }}-${{ inputs.target }}
374-
# CARGO_TARGET_DIR is set to D:\t on Windows to avoid MAX_PATH issues.
375373
# Default Windows builds place bundles under release/, but cross-compiles (ARM64) nest under target/<triple>/release.
376374
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
379377
retention-days: 30

0 commit comments

Comments
 (0)