refactor(ci): update ccache setup in Windows workflows

- Modified the CI and release workflows to set up ccache directories for Windows, improving build performance.
- Ensured that the ccache environment variables are correctly initialized, enhancing caching efficiency.

Benefits:
- Streamlines the caching process in Windows environments, leading to faster build times and improved CI efficiency.
This commit is contained in:
scawful
2025-10-14 13:40:32 -04:00
parent 2b451fad95
commit 977ed78785
2 changed files with 10 additions and 5 deletions

View File

@@ -378,11 +378,14 @@ jobs:
shell: pwsh
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: $HOME/.ccache
run: |
Write-Host "::group::CMake Configuration (Windows)" -ForegroundColor Cyan
# Set up ccache directories for Windows
if (Get-Command ccache -ErrorAction SilentlyContinue) {
$env:CCACHE_BASEDIR = "${{ github.workspace }}"
$env:CCACHE_DIR = Join-Path $env:USERPROFILE ".ccache"
Write-Host "CCACHE_DIR set to: $env:CCACHE_DIR"
ccache --zero-stats
}
if (-not $env:CMAKE_TOOLCHAIN_FILE -or -not (Test-Path $env:CMAKE_TOOLCHAIN_FILE)) {

View File

@@ -388,12 +388,14 @@ jobs:
if: runner.os == 'Windows'
id: configure_windows
shell: pwsh
env:
CCACHE_BASEDIR: ${{ github.workspace }}
CCACHE_DIR: $HOME/.ccache
run: |
Write-Host "::group::CMake Configuration (Windows)" -ForegroundColor Cyan
# Set up ccache directories for Windows
if (Get-Command ccache -ErrorAction SilentlyContinue) {
$env:CCACHE_BASEDIR = "${{ github.workspace }}"
$env:CCACHE_DIR = Join-Path $env:USERPROFILE ".ccache"
Write-Host "CCACHE_DIR set to: $env:CCACHE_DIR"
ccache --zero-stats
}
if (-not $env:CMAKE_TOOLCHAIN_FILE -or -not (Test-Path $env:CMAKE_TOOLCHAIN_FILE)) {