File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
.github/actions/ccache-setup Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ Cross-platform ccache setup action with automatic caching.
2828|--------|-------------|
2929| `cache-hit` | `true` if cache was restored |
3030| `cache-key` | Generated cache key |
31+ | `cache-dir` | Path to ccache directory |
3132
3233# # Cache key format
3334
Original file line number Diff line number Diff line change @@ -26,6 +26,9 @@ outputs:
2626 cache-key :
2727 description : ' The cache key used'
2828 value : ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.arch }}-${{ steps.ccache-key.outputs.compiler }}-${{ steps.ccache-key.outputs.build-type }}-${{ steps.ccache-key.outputs.short-sha }}
29+ cache-dir :
30+ description : ' Path to ccache directory'
31+ value : ${{ steps.ccache-key.outputs.dir }}
2932
3033runs :
3134 using : composite
5659 CMAKE_BUILD_TYPE : ${{ inputs.cmake-build-type }}
5760 run : |
5861 CCACHE_DIR="${{ github.workspace }}/.ccache"
62+ # Convert to Windows path if on Windows (native ccache doesn't understand Unix paths)
63+ if command -v cygpath &> /dev/null; then
64+ CCACHE_DIR=$(cygpath -w "$CCACHE_DIR")
65+ fi
5966 echo "dir=$CCACHE_DIR" >> "$GITHUB_OUTPUT"
6067 echo "CCACHE_DIR=$CCACHE_DIR" >> "$GITHUB_ENV"
6168
@@ -130,9 +137,6 @@ runs:
130137 key : ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.arch }}-${{ steps.ccache-key.outputs.compiler }}-${{ steps.ccache-key.outputs.build-type }}-${{ steps.ccache-key.outputs.short-sha }}
131138 restore-keys : |
132139 ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.arch }}-${{ steps.ccache-key.outputs.compiler }}-${{ steps.ccache-key.outputs.build-type }}-
133- ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.arch }}-${{ steps.ccache-key.outputs.compiler }}-
134- ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.compiler }}-${{ steps.ccache-key.outputs.build-type }}-
135- ccache-${{ steps.ccache-key.outputs.prefix }}${{ steps.ccache-key.outputs.distro }}-${{ steps.ccache-key.outputs.compiler }}-
136140
137141 - name : Configure ccache
138142 shell : bash
You can’t perform that action at this time.
0 commit comments