From c33392db5be1ee3faeaef3a1a212b2bf8229b90c Mon Sep 17 00:00:00 2001 From: copilot Date: Sun, 4 Oct 2026 20:13:01 +0200 Subject: [PATCH] Fix Windows CI: detect Conan default profile on fresh runners GitHub-hosted windows-latest has no ~/.conan2/profiles/default until conan profile detect runs; also pin -pr:b=default in conan_init. --- .github/workflows/windows_release.yml | 4 ++++ windowsinstall/conan_init_x86_64.bat | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/windows_release.yml b/.github/workflows/windows_release.yml index 176ada5..0b40e1e 100644 --- a/.github/workflows/windows_release.yml +++ b/.github/workflows/windows_release.yml @@ -37,6 +37,10 @@ jobs: python -m pip install --upgrade pip python -m pip install "conan>=2,<3" conan --version + # Fresh runners have no default profile; host==build for MSVC. + if (-not (Test-Path "$env:USERPROFILE\.conan2\profiles\default")) { + conan profile detect --force + } - name: Resolve version id: ver diff --git a/windowsinstall/conan_init_x86_64.bat b/windowsinstall/conan_init_x86_64.bat index 99a5c67..d97ad37 100644 --- a/windowsinstall/conan_init_x86_64.bat +++ b/windowsinstall/conan_init_x86_64.bat @@ -1,5 +1,8 @@ @echo off cd %~dp0 cd .. +if not exist "%USERPROFILE%\.conan2\profiles\default" ( + conan profile detect --force +) call .\conan\export_libs.bat -conan install . -of=build-x86_64 --build=missing -pr=conan/profiles/win-x86_64 \ No newline at end of file +conan install . -of=build-x86_64 --build=missing -pr:h=conan/profiles/win-x86_64 -pr:b=default \ No newline at end of file