mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
fix: initialize Conan before patching settings.yml
- Check if settings.yml exists before trying to patch it - Run 'conan profile new default --detect' if needed - Fixes FileNotFoundError for fresh runners without cache
This commit is contained in:
@@ -76,6 +76,7 @@ runs:
|
|||||||
import yaml
|
import yaml
|
||||||
import re
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
import subprocess
|
||||||
|
|
||||||
# Extract Clang version from compiler-id (e.g., "clang-18-libcxx" -> "18")
|
# Extract Clang version from compiler-id (e.g., "clang-18-libcxx" -> "18")
|
||||||
compiler_id = "${{ inputs.compiler-id }}"
|
compiler_id = "${{ inputs.compiler-id }}"
|
||||||
@@ -89,6 +90,12 @@ runs:
|
|||||||
print(f"Detected Clang version {clang_version} from compiler-id")
|
print(f"Detected Clang version {clang_version} from compiler-id")
|
||||||
|
|
||||||
settings_path = Path.home() / '.conan' / 'settings.yml'
|
settings_path = Path.home() / '.conan' / 'settings.yml'
|
||||||
|
|
||||||
|
# Initialize Conan if settings.yml doesn't exist yet
|
||||||
|
if not settings_path.exists():
|
||||||
|
print("Conan not initialized, creating default profile...")
|
||||||
|
subprocess.run(['conan', 'profile', 'new', 'default', '--detect'], check=False)
|
||||||
|
|
||||||
with open(settings_path, 'r') as f:
|
with open(settings_path, 'r') as f:
|
||||||
settings = yaml.safe_load(f)
|
settings = yaml.safe_load(f)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user