summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/actions/common-setup/action.yml17
-rw-r--r--.github/workflows/ci-slang-build.yml3
2 files changed, 9 insertions, 11 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"
diff --git a/.github/workflows/ci-slang-build.yml b/.github/workflows/ci-slang-build.yml
index 6831f3d21..b5a492543 100644
--- a/.github/workflows/ci-slang-build.yml
+++ b/.github/workflows/ci-slang-build.yml
@@ -114,6 +114,7 @@ jobs:
cmake_launcher_defines=()
if [[ -n "${ccache_symlinks_path:-}" ]]; then
echo "🔧 Using ccache with launcher: ${ccache_symlinks_path}"
+ echo "🔧 CCACHE_DIR is set to: ${CCACHE_DIR:-'not set'}"
cmake_launcher_defines+=("-DCMAKE_C_COMPILER_LAUNCHER=${ccache_symlinks_path}")
cmake_launcher_defines+=("-DCMAKE_CXX_COMPILER_LAUNCHER=${ccache_symlinks_path}")
else
@@ -155,8 +156,6 @@ jobs:
if command -v ccache &> /dev/null; then
echo "📊 ccache statistics (post-build):"
ccache --show-stats || true
- echo "🎯 ccache hit ratio summary:"
- ccache --show-stats | grep -E "(cache hit|cache miss|files compiled)" || true
fi
- name: Check documented compiler versions