summaryrefslogtreecommitdiffstats
path: root/.github/actions/common-setup/action.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/actions/common-setup/action.yml')
-rw-r--r--.github/actions/common-setup/action.yml17
1 files changed, 8 insertions, 9 deletions
diff --git a/.github/actions/common-setup/action.yml b/.github/actions/common-setup/action.yml
index 1ab2d1a48..5f4bac02c 100644
--- a/.github/actions/common-setup/action.yml
+++ b/.github/actions/common-setup/action.yml
@@ -150,26 +150,25 @@ runs:
echo "✅ ccache found on self-hosted runner - setting up persistent caching"
# Set ccache directory to a persistent location outside workspace
- # Use runner temp directory with a unique path per repo/compiler/platform
- ccache_base_dir="${RUNNER_TEMP:-/tmp}/ccache-slang"
+ if [[ "${{ inputs.os }}" == "windows" ]]; then
+ ccache_base_dir="C:/ccache-slang"
+ else
+ # Linux/macOS: Use home directory for persistence
+ ccache_base_dir="$HOME/.ccache-slang"
+ fi
ccache_dir="$ccache_base_dir/${{ inputs.os }}-${{ inputs.compiler }}-${{ inputs.platform }}"
mkdir -p "$ccache_dir"
echo "CCACHE_DIR=$ccache_dir" >> $GITHUB_ENV
echo "🔧 Using persistent ccache directory: $ccache_dir"
# Configure ccache settings for local use only
- ccache --set-config=max_size=2G
+ ccache --set-config=max_size=20G
ccache --set-config=compression=true
ccache --set-config=compression_level=6
ccache --set-config=sloppiness=pch_defines,time_macros
+ ccache --set-config=cache_dir="$ccache_dir"
# Enable ccache for CMake (set environment variables)
# Get the full path to ccache executable
ccache_path=$(which ccache)
echo "ccache_symlinks_path=$ccache_path" >> $GITHUB_ENV
-
- # Show initial stats
- echo "ccache configuration:"
- ccache --show-config || echo "Could not show ccache config"
- ccache --zero-stats || echo "Could not zero ccache stats"
- ccache --show-stats || echo "Could not show ccache stats"