|  | 
| 92 | 92 |         with: | 
| 93 | 93 |           path: | | 
| 94 | 94 |             ~/.cargo | 
| 95 |  | -            nobodywho/target | 
|  | 95 | +            C:/b | 
| 96 | 96 |           key: ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | 
| 97 | 97 |           restore-keys: | | 
| 98 | 98 |             ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}- | 
| @@ -120,18 +120,27 @@ jobs: | 
| 120 | 120 |       - name: Build with Cargo | 
| 121 | 121 |         # move things into a shortly-named dir in the root, because windows is made by fuckwits who think limiting paths to 260 chars is ok | 
| 122 | 122 |         run: | | 
| 123 |  | -          mv ./nobodywho/* C:/ | 
| 124 |  | -          cd C:/ | 
| 125 |  | -          # Use an even shorter target directory to avoid path length issues with git dependencies | 
| 126 |  | -          cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} --locked --target-dir C:/t | 
|  | 123 | +          # Copy source to short path | 
|  | 124 | +          mkdir C:\s | 
|  | 125 | +          xcopy /E /I /Y .\nobodywho\* C:\s\ | 
|  | 126 | +          cd C:\s | 
|  | 127 | +          # Create the full target directory structure | 
|  | 128 | +          mkdir -p C:\b\${{ matrix.target }}\${{ matrix.profile }}\build | 
|  | 129 | +          # Map Y: deep into the build path where llama-cpp-sys builds happen | 
|  | 130 | +          # This replaces "C:\b\x86_64-pc-windows-msvc\debug\build" with just "Y:" | 
|  | 131 | +          subst Y: C:\b\${{ matrix.target }}\${{ matrix.profile }}\build | 
|  | 132 | +          # Build using C:\b as target dir, but Y: will be used for the deep build paths | 
|  | 133 | +          cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} --locked --target-dir C:\b | 
| 127 | 134 |         env: | 
| 128 | 135 |           RUSTFLAGS: >- | 
| 129 | 136 |             -l Advapi32 | 
| 130 | 137 | 
 | 
| 131 | 138 |       - name: "Rename built files" | 
| 132 | 139 |         run: | | 
| 133 |  | -          cp C:/t/${{ matrix.target }}/${{ matrix.profile }}/nobodywho_${{ matrix.integration }}.dll ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dll | 
| 134 |  | -          cp C:/t/${{ matrix.target }}/${{ matrix.profile }}/nobodywho_${{ matrix.integration }}.pdb ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.pdb | 
|  | 140 | +          cp C:\b\${{ matrix.target }}\${{ matrix.profile }}\nobodywho_${{ matrix.integration }}.dll .\nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dll | 
|  | 141 | +          cp C:\b\${{ matrix.target }}\${{ matrix.profile }}\nobodywho_${{ matrix.integration }}.pdb .\nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.pdb | 
|  | 142 | +          # Clean up virtual drive | 
|  | 143 | +          subst Y: /d | 
| 135 | 144 | 
 | 
| 136 | 145 |       - name: "Upload build artifacts" | 
| 137 | 146 |         uses: actions/upload-artifact@v4 | 
|  | 
0 commit comments