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:
21
.github/workflows/release.yml
vendored
21
.github/workflows/release.yml
vendored
@@ -200,6 +200,15 @@ jobs:
|
|||||||
Write-Host "vcpkg setup failed, using minimal build configuration"
|
Write-Host "vcpkg setup failed, using minimal build configuration"
|
||||||
|
|
||||||
# Configure CMake
|
# 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)
|
- name: Configure CMake (Linux/macOS)
|
||||||
if: runner.os != 'Windows'
|
if: runner.os != 'Windows'
|
||||||
run: |
|
run: |
|
||||||
@@ -216,6 +225,18 @@ jobs:
|
|||||||
-DYAZE_MINIMAL_BUILD=OFF \
|
-DYAZE_MINIMAL_BUILD=OFF \
|
||||||
-GNinja
|
-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)
|
- name: Configure CMake (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
Reference in New Issue
Block a user