Repository navigation
Commit 577d666
committed
ci(release): find the Windows DLL where CMake actually puts it
The first real tag push ran release.yml end to end for the first time and the
windows-x64 leg failed at "Package libraries (Windows)" with "DLL not found",
while darwin-arm64, linux-x64 and linux-arm64 all succeeded - so the release
job never ran and v0.7.0 has no GitHub Release.
zvec's CMake sets CMAKE_RUNTIME_OUTPUT_DIRECTORY to ${PROJECT_BINARY_DIR}/bin
and CMAKE_ARCHIVE/LIBRARY_OUTPUT_DIRECTORY to .../lib (zvec/cmake/bazel.cmake),
and a DLL is a RUNTIME artifact. The Windows build here uses Ninja, which is
single-config, so there is no Release/ subdirectory at all and the library
lands at zvec/build/bin/zvec_c_api.dll. The step searched lib/Release, lib and
bin/Release - the one directory that matters was missing from the list. The
Publish JAR workflow resolves the same library correctly, which is why the
identical cache entry (zvec-build-windows-x64-host-8321c13...-v0.7.0) worked
there and not here.
Resolve it the way publish-jar.yml does: search bin, bin/Release, lib and
lib/Release in that order and match *zvec_c_api*.dll rather than one exact
name, so a suffixed build still resolves. The step is bash now instead of
pwsh - Git Bash is on every Windows runner (the license guard below already
depends on it), both workflows then share one idiom, and the script can be
syntax-checked and dry-run locally. That also fixes the diagnostics: the runner
sets ErrorActionPreference=stop, so the old `Write-Error "DLL not found"`
terminated the step before the `Get-ChildItem` listing below it could run, and
the failure reported nothing to work from. The miss path now emits an
::error:: annotation and prints up to 40 *.dll/*.lib paths under zvec/build.
Verified locally with `bash -n` plus three synthetic trees: the Ninja layout
(dll in bin/, lib in lib/) stages windows_amd64/zvec_c_api.{dll,lib} along
with c_api.h, both jieba dict files, LICENSE and NOTICE; the multi-config
layout (bin/Release, lib/Release) resolves too; and a tree without the DLL
prints the annotation, lists what is present and exits 1. actionlint reports
the same six pre-existing shellcheck infos as before.1 parent b5a7fc8 commit 577d666
1 file changed
Lines changed: 48 additions & 45 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
263 | 272 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
298 | | - | |
299 | | - | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
300 | 304 | | |
301 | 305 | | |
302 | | - | |
303 | | - | |
| 306 | + | |
| 307 | + | |
304 | 308 | | |
305 | 309 | | |
306 | | - | |
307 | | - | |
308 | | - | |
309 | | - | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
310 | 314 | | |
311 | 315 | | |
312 | | - | |
313 | | - | |
314 | | - | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
315 | 319 | | |
316 | | - | |
317 | | - | |
| 320 | + | |
318 | 321 | | |
319 | 322 | | |
320 | 323 | | |
| |||
0 commit comments