Enhance release workflow by adding build directory cleanup steps

- Introduced steps to clean the build directory for both Linux/macOS and Windows environments before configuring CMake, ensuring a fresh build configuration and avoiding potential cache issues.
- This change improves the reliability of the build process across different operating systems.
This commit is contained in:
scawful
2025-09-28 17:05:38 -04:00
parent 0d24738c78
commit b7b8962e13

View File

@@ -200,6 +200,15 @@ jobs:
Write-Host "vcpkg setup failed, using minimal build configuration"
# Configure CMake
# Clean build directory to avoid cache issues
- name: Clean build directory (Linux/macOS)
if: runner.os != 'Windows'
run: |
echo "Cleaning build directory to ensure fresh configuration..."
rm -rf build
mkdir -p build
echo "Build directory cleaned successfully"
- name: Configure CMake (Linux/macOS)
if: runner.os != 'Windows'
run: |
@@ -216,6 +225,18 @@ jobs:
-DYAZE_MINIMAL_BUILD=OFF \
-GNinja
# Clean build directory to avoid cache issues
- name: Clean build directory (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
Write-Host "Cleaning build directory to ensure fresh configuration..."
if (Test-Path "build") {
Remove-Item -Recurse -Force "build"
}
New-Item -ItemType Directory -Path "build" | Out-Null
Write-Host "Build directory cleaned successfully"
- name: Configure CMake (Windows)
if: runner.os == 'Windows'
shell: pwsh