summaryrefslogtreecommitdiffstats
path: root/.github/actions
diff options
context:
space:
mode:
authorGangzheng Tong <tonggangzheng@gmail.com>2025-09-02 23:26:41 -0700
committerGitHub <noreply@github.com>2025-09-02 23:26:41 -0700
commit4886bf95fcf6e7f38f48a346f4112fe340a453c8 (patch)
treeb1aec1303346c22d99d08ec12bd150402dbf50df /.github/actions
parent7d15d388d7e92547f1cc8ca47748b79589701051 (diff)
manually config ccache locally (#8351)
This avoids uploading the ccache to github and take the cache storage. --------- Co-authored-by: slangbot <ellieh+slangbot@nvidia.com> Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to '.github/actions')
-rw-r--r--.github/actions/common-setup/action.yml48
1 files changed, 35 insertions, 13 deletions
diff --git a/.github/actions/common-setup/action.yml b/.github/actions/common-setup/action.yml
index bf6174c75..f2e9567dd 100644
--- a/.github/actions/common-setup/action.yml
+++ b/.github/actions/common-setup/action.yml
@@ -118,17 +118,39 @@ runs:
linux*) echo "${{github.workspace}}/external/slang-binaries/spirv-tools/$(uname -m)-linux/bin" >> "$GITHUB_PATH";;
esac
- # Setup ccache for self-hosted runners (Windows only for now)
- - name: Setup ccache
+ # Setup ccache for local compilation speedup (Windows self-hosted only)
+ # Only use ccache if already installed - don't attempt installation
+ - name: Setup ccache (if available, local only, no GitHub uploads)
if: ${{ inputs.os == 'windows' && runner.environment == 'self-hosted' }}
- uses: Chocobo1/setup-ccache-action@v1
- with:
- update_packager_index: false
- install_ccache: true
- prepend_symlinks_to_path: true
- windows_compile_environment: msvc
- ccache_options: |
- max_size=2G
- compression=true
- compression_level=6
- sloppiness=pch_defines,time_macros
+ shell: bash
+ run: |
+ # Check if ccache is available
+ if ! command -v ccache &> /dev/null; then
+ echo "⚠️ ccache not found on this self-hosted runner"
+ echo " Skipping ccache setup to avoid permission issues"
+ echo " Build will proceed without ccache acceleration"
+ echo " To enable ccache: manually install it on the runner with admin rights"
+ exit 0
+ fi
+
+ echo "✅ ccache found on self-hosted runner - setting up local caching"
+
+ # Set ccache directory (local temp directory)
+ ccache_dir="${{ github.workspace }}/.ccache-local"
+ mkdir -p "$ccache_dir"
+ echo "CCACHE_DIR=$ccache_dir" >> $GITHUB_ENV
+
+ # Configure ccache settings for local use only
+ ccache --set-config=max_size=2G
+ ccache --set-config=compression=true
+ ccache --set-config=compression_level=6
+ ccache --set-config=sloppiness=pch_defines,time_macros
+
+ # Enable ccache for CMake (set environment variables)
+ echo "ccache_symlinks_path=ccache" >> $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"