9797 # gcc_cc: ""
9898 # gcc_cxx: ""
9999 # macOS without CUDA (NVIDIA dropped macOS CUDA support in 2019)
100- - os : macos-14
100+ # Use macos-15 (not macos-14) because Xcode 15.4's libc++ has a
101+ # pointer_traits bug with CXX crate's contiguous iterators in C++20.
102+ - os : macos-15
101103 architecture : aarch64
102104 cuda_feature : " "
103105 install_cuda : false
@@ -113,7 +115,7 @@ jobs:
113115 install_cuda : true
114116
115117 steps :
116- - uses : actions/checkout@v4
118+ - uses : actions/checkout@v6
117119 with :
118120 ref : ${{ inputs.sha || github.sha }}
119121 submodules : recursive
@@ -130,14 +132,54 @@ jobs:
130132 # See: https://github.com/Jimver/cuda-toolkit/issues/382
131133 - name : Install CUDA Toolkit (Windows)
132134 if : runner.os == 'Windows' && matrix.install_cuda
133- uses : Jimver/cuda-toolkit@v0.2.29
135+ uses : Jimver/cuda-toolkit@v0.2.30
134136 with :
135137 cuda : ' 12.5.1'
136138 method : ' local'
137139 sub-packages : ' ["nvcc", "cudart", "cublas", "cublas_dev", "thrust"]'
138140
141+ # On Windows, Git Bash's /usr/bin/link.exe shadows MSVC's link.exe.
142+ # Create .cargo/config.toml with the explicit MSVC linker path so cargo
143+ # uses the correct linker inside cibuildwheel (which runs on the host).
144+ - name : Configure MSVC linker for Cargo (Windows)
145+ if : runner.os == 'Windows'
146+ shell : pwsh
147+ run : |
148+ $vsWhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
149+ $vsPath = & $vsWhere -latest -property installationPath
150+ $linkPath = Get-ChildItem -Path "$vsPath\VC\Tools\MSVC" -Recurse -Filter "link.exe" |
151+ Where-Object { $_.FullName -like "*\bin\Hostx64\x64\*" } |
152+ Select-Object -First 1 -ExpandProperty FullName
153+
154+ if ($linkPath) {
155+ $escapedPath = $linkPath.Replace('\', '/')
156+ $configContent = "[target.x86_64-pc-windows-msvc]`nlinker = `"$escapedPath`""
157+
158+ # Create in repo root (for CIBW_BEFORE_ALL cargo commands)
159+ New-Item -ItemType Directory -Force -Path .cargo | Out-Null
160+ $configContent | Out-File -FilePath ".cargo\config.toml" -Encoding UTF8
161+
162+ # Create in pecos-rslib directory (for maturin builds)
163+ New-Item -ItemType Directory -Force -Path "python\pecos-rslib\.cargo" | Out-Null
164+ $configContent | Out-File -FilePath "python\pecos-rslib\.cargo\config.toml" -Encoding UTF8
165+
166+ # Create in user cargo home (fallback)
167+ $cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { "$env:USERPROFILE\.cargo" }
168+ New-Item -ItemType Directory -Force -Path $cargoHome | Out-Null
169+ if (Test-Path "$cargoHome\config.toml") {
170+ "`n$configContent" | Out-File -FilePath "$cargoHome\config.toml" -Encoding UTF8 -Append
171+ } else {
172+ $configContent | Out-File -FilePath "$cargoHome\config.toml" -Encoding UTF8
173+ }
174+
175+ Write-Host "Configured MSVC linker: $linkPath"
176+ } else {
177+ Write-Error "Could not find MSVC link.exe"
178+ exit 1
179+ }
180+
139181 - name : Build wheels
140- uses : pypa/cibuildwheel@v3.2 .1
182+ uses : pypa/cibuildwheel@v3.3 .1
141183 with :
142184 package-dir : python/pecos-rslib
143185 output-dir : wheelhouse
@@ -175,7 +217,7 @@ jobs:
175217 else
176218 echo "Skipping CUDA installation (GPU support not enabled for this build)"
177219 fi
178- cargo run --release -p pecos --features cli -- llvm install --force
220+ cargo run --release -p pecos --features cli -- install llvm --force
179221 CIBW_REPAIR_WHEEL_COMMAND_LINUX : >
180222 auditwheel repair -w {dest_dir} {wheel} &&
181223 pipx run abi3audit --strict --report {wheel}
@@ -188,7 +230,7 @@ jobs:
188230 curl -sSf https://sh.rustup.rs | sh -s -- -y
189231 source $HOME/.cargo/env
190232 rustup update
191- cargo run --release -p pecos --features cli -- llvm install --force
233+ cargo run --release -p pecos --features cli -- install llvm --force
192234 # Create a codesign wrapper that strips DYLD_LIBRARY_PATH to prevent
193235 # crashes on macOS 15 when bundled libc++ conflicts with system libc++
194236 mkdir -p $HOME/.pecos/bin
@@ -205,8 +247,8 @@ jobs:
205247 CIBW_BEFORE_ALL_WINDOWS : >
206248 echo "=== Installing LLVM using pecos ===" &&
207249 rustup update &&
208- echo "=== Running pecos llvm install ===" &&
209- cargo run --release -p pecos --features cli -- llvm install --force &&
250+ echo "=== Running pecos install llvm ===" &&
251+ cargo run --release -p pecos --features cli -- install llvm --force &&
210252 echo "=== Checking LLVM installation ===" &&
211253 (test -d "C:\\Users\\runneradmin\\.pecos\\llvm" && echo "LLVM directory exists" && ls -la "C:\\Users\\runneradmin\\.pecos\\llvm" && (ls -la "C:\\Users\\runneradmin\\.pecos\\llvm\\bin" || echo "bin directory not found")) || (echo "ERROR: LLVM directory not found!" && exit 1) &&
212254 echo "=== Verifying LLVM_SYS_140_PREFIX ===" &&
@@ -248,16 +290,16 @@ jobs:
248290 - runner : macos-15-intel
249291 os : macos-15-intel
250292 architecture : x86_64
251- - runner : macos-14
252- os : macos-14
293+ - runner : macos-15
294+ os : macos-15
253295 architecture : aarch64
254296 steps :
255- - uses : actions/checkout@v4
297+ - uses : actions/checkout@v6
256298 with :
257299 ref : ${{ inputs.sha || github.sha }}
258300
259301 - name : Set up Python ${{ matrix.python-version }}
260- uses : actions/setup-python@v5
302+ uses : actions/setup-python@v6
261303 with :
262304 python-version : ${{ matrix.python-version }}
263305
@@ -314,12 +356,12 @@ jobs:
314356 needs.build_wheelspecos_rslib.result == 'success'
315357 runs-on : ubuntu-latest
316358 steps :
317- - uses : actions/checkout@v4
359+ - uses : actions/checkout@v6
318360 with :
319361 ref : ${{ inputs.sha || github.sha }}
320362
321363 - name : Set up Python
322- uses : actions/setup-python@v5
364+ uses : actions/setup-python@v6
323365 with :
324366 python-version : ' 3.10'
325367
@@ -359,12 +401,12 @@ jobs:
359401 runs-on : ubuntu-latest
360402
361403 steps :
362- - uses : actions/checkout@v4
404+ - uses : actions/checkout@v6
363405 with :
364406 ref : ${{ inputs.sha || github.sha }}
365407
366408 - name : Set up Python
367- uses : actions/setup-python@v5
409+ uses : actions/setup-python@v6
368410 with :
369411 python-version : ' 3.10'
370412
0 commit comments