CI: fix Windows nmake env and Linux parallel-build race (Tests workflow) - #25
CI: fix Windows nmake env and Linux parallel-build race (Tests workflow)#25russimicro wants to merge 2 commits into
Conversation
…flow
Both were failing on main independently of any sample change:
- Windows: "Build Harbour" ran `nmake` directly in a plain cmd shell, which
has no MSVC dev environment (INCLUDE/LIB/PATH for cl.exe, link.exe,
nmake.exe) loaded -> "'nmake' is not recognized". Locates VS via vswhere
and loads it with VsDevCmd.bat first, same technique already used by
run_tests.bat for the later "Run tests" step.
- Linux: `make -j$(nproc) install` of harbour/core intermittently failed
linking libhbmacro ("undefined reference to hb_compExpr*"), consistent
with a parallel-build ordering race in that Makefile. Switched to a
sequential `make install` (slower, reliable).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…nstead First attempt (loading VsDevCmd before nmake) got further but still failed: NMAKE : fatal error U1052: file 'C:\harbour-src\win\msvc64\makefile.vc' not found harbour/core no longer ships win/msvc64/makefile.vc at all — per its own doc/gmake.txt, Windows/MSVC builds go through the same cross-platform GNU Make system as Linux/macOS, using the win-make.exe binary bundled at the repo root plus HB_PLATFORM=win / HB_COMPILER=msvc64 (VsDevCmd still needed on PATH for cl.exe/link.exe/ml64.exe). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Estado tras 2 intentos — dejo esto documentado, sin más pushesWindows — el primer intento (cargar Rastreé la causa hasta ifneq ($(HB_PLATFORM),)
ifneq ($(HB_COMPILER),)
...
first clean install::
+$(DIR_RULE)Los targets Linux — probé cambiar Conclusión: ambos fallos son preexistentes en 🤖 Generado con Claude Code |
Contexto
Encontrado al revisar los checks de #24: ambos jobs de
Testsya fallaban enmainde forma independiente al PR de la rama web.Windows —
'nmake' is not recognizedEl paso "Build Harbour" ejecuta
nmakeen uncmdplano, sin el entorno dedesarrollo de MSVC cargado (
INCLUDE/LIB/PATHparacl.exe,link.exe,nmake.exe).run_tests.batya resuelve esto para su propio paso (localizaVS con
vswherey llama aVsDevCmd.bat); este PR aplica la misma técnicaantes de invocar
nmake.Linux — link error en
libhbmacromake -j$(nproc) installdeharbour/corefallaba de forma intermitente:Consistente con una carrera de orden en el Makefile de harbour/core bajo
build paralelo. Se cambia a
make installsecuencial (más lento, estable).Alcance
Solo toca
.github/workflows/tests.yml; no modifica ningún sample ni elcontrato de build existente.
🤖 Generado con Claude Code