diff --git a/.github/workflows/windows-cmake.yml b/.github/workflows/windows-cmake.yml index 3d43b7e91..c0aeaa010 100644 --- a/.github/workflows/windows-cmake.yml +++ b/.github/workflows/windows-cmake.yml @@ -93,17 +93,23 @@ jobs: chmod +x "$RUNNER_TEMP/cxx-launcher.sh" - name: CMake configure - run: > - cmake -G Ninja -B Build-cmake -S . - "-DCMAKE_CXX_COMPILER_LAUNCHER=bash;$RUNNER_TEMP/cxx-launcher.sh" - -DCMAKE_POLICY_VERSION_MINIMUM=3.5 - -DCMAKE_BUILD_TYPE=Release - -DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=OFF - -DRS_SQLCIPHER=ON -DRS_BITDHT=ON - -DRS_BRODCAST_DISCOVERY=ON -DRS_MINIUPNPC=ON - -DRS_FORUM_DEEP_INDEX=OFF - -DCMAKE_C_FLAGS="-include string.h -include stdint.h" - -DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body" + run: | + # Plain "bash" would be resolved by CreateProcess to Windows' own + # C:\Windows\System32\bash.exe -- the WSL stub, which answers + # "Windows Subsystem for Linux has no installed distributions". + # Name the MSYS2 one, in a path CMake and ninja can both use. + BASH_EXE="$(cygpath -m "$(command -v bash)")" + LAUNCHER="$(cygpath -m "$RUNNER_TEMP/cxx-launcher.sh")" + cmake -G Ninja -B Build-cmake -S . \ + "-DCMAKE_CXX_COMPILER_LAUNCHER=$BASH_EXE;$LAUNCHER" \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ + -DCMAKE_BUILD_TYPE=Release \ + -DRS_RNPLIB=ON -DRS_JSON_API=ON -DRS_WEBUI=OFF \ + -DRS_SQLCIPHER=ON -DRS_BITDHT=ON \ + -DRS_BRODCAST_DISCOVERY=ON -DRS_MINIUPNPC=ON \ + -DRS_FORUM_DEEP_INDEX=OFF \ + -DCMAKE_C_FLAGS="-include string.h -include stdint.h" \ + -DCMAKE_CXX_FLAGS="-include cstring -include cstdint -Wno-template-body" - name: CMake build run: cmake --build Build-cmake -j3