Fix Windows CI: detect Conan default profile on fresh runners
Some checks are pending
Windows Release / windows-x86_64 (push) Waiting to run

GitHub-hosted windows-latest has no ~/.conan2/profiles/default until
conan profile detect runs; also pin -pr:b=default in conan_init.
This commit is contained in:
copilot 2026-10-04 20:13:01 +02:00
parent 86bf17b81e
commit c33392db5b
2 changed files with 8 additions and 1 deletions

View file

@ -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

View file

@ -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
conan install . -of=build-x86_64 --build=missing -pr:h=conan/profiles/win-x86_64 -pr:b=default