From fd9e7bce1f5b26326d9d7157e893df4fcdae2e02 Mon Sep 17 00:00:00 2001 From: Filip Leonarski Date: Tue, 25 Aug 2026 20:12:55 +0200 Subject: [PATCH] CI: drive the Windows rugnux build from cmd, as the viewer build already does The job used shell: bash, and the Windows runner has no bash on PATH, so it failed before running cmake. It also skipped the MSVC environment, which every cmake invocation on that runner needs: build-windows calls vcvars64.bat, located through vswhere, at the start of each step. Follow it exactly - cmd, the same vcvars preamble, -G Ninja, and cpack from inside the build directory - and keep powershell only for the upload, which is what build-windows uses there too. CMAKE_PREFIX_PATH drops the Qt entry and keeps C:/deps: JFJOCH_RUGNUX_ONLY is the portable subtree minus viewer/, so it needs Eigen and ZLIB and no Qt. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01SQjneRUssfhi1k9rq8Ts3h --- .gitea/workflows/build_and_test.yml | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/.gitea/workflows/build_and_test.yml b/.gitea/workflows/build_and_test.yml index f3dee41f..eb1c7f0f 100644 --- a/.gitea/workflows/build_and_test.yml +++ b/.gitea/workflows/build_and_test.yml @@ -239,17 +239,32 @@ jobs: build-rugnux-windows: name: build:rugnux:windows runs-on: windows-11-cuda-qt + timeout-minutes: 120 steps: - uses: actions/checkout@v4 + # cmd, not bash: the Windows runner has no bash, and every cmake invocation needs the MSVC + # environment from vcvars64.bat first -- same shape as build-windows above. No Qt in + # CMAKE_PREFIX_PATH: JFJOCH_RUGNUX_ONLY is the portable subtree minus viewer/, so C:/deps + # (Eigen, ZLIB) is all it needs. - name: Configure rugnux build - shell: bash - # No Qt needed: JFJOCH_RUGNUX_ONLY is the portable subtree minus viewer/. + shell: cmd run: | - cmake -S . -B build-rugnux -DJFJOCH_RUGNUX_ONLY=ON -DJFJOCH_USE_CUDA=ON \ - ${{ env.MSVC_ARCH_CMAKE_FLAGS }} -DCMAKE_BUILD_TYPE=Release + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i" + call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" + cmake -G Ninja -B build-rugnux -DJFJOCH_RUGNUX_ONLY=ON -DJFJOCH_USE_CUDA=ON -DCMAKE_BUILD_TYPE=Release ${{ env.MSVC_ARCH_CMAKE_FLAGS }} -DCMAKE_PREFIX_PATH="C:/deps" + - name: Build rugnux + shell: cmd + run: | + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i" + call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" + cmake --build build-rugnux - name: Build rugnux zip - shell: bash - run: cmake --build build-rugnux --config Release --target PACKAGE -j + shell: cmd + run: | + for /f "usebackq tokens=*" %%i in (`"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath`) do set "VSPATH=%%i" + call "%VSPATH%\VC\Auxiliary\Build\vcvars64.bat" + cd build-rugnux + cpack - name: Upload rugnux zip to release if: github.ref_type == 'tag' shell: powershell