From b7b8962e135712fa836bedbd2c51a959d9d7fe34 Mon Sep 17 00:00:00 2001 From: scawful Date: Sun, 28 Sep 2025 17:05:38 -0400 Subject: [PATCH] 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. --- .github/workflows/release.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f046e08d..674c251c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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