Skip to content

Commit d7f7ed0

Browse files
Fix cache issues with self-hosted runners
Disable julia-actions/cache for self-hosted runners as they persist between runs, which causes the cache action to fail when the depot already exists. This change: - Adds conditional logic to detect self-hosted runners via USE_SELF_HOSTED repository variable - Passes self-hosted=true when USE_SELF_HOSTED is set - Disables cache when running on self-hosted runners To use self-hosted runners, set the USE_SELF_HOSTED repository variable to 'true'. Fixes the issue discussed here: https://github.com/SciML/ModelingToolkit.jl/actions/runs/16840335621/job/47712027510 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 5f888c9 commit d7f7ed0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/Tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,8 @@ jobs:
4545
with:
4646
julia-version: "${{ matrix.version }}"
4747
group: "${{ matrix.group }}"
48+
# Disable cache for self-hosted runners since they persist between runs
49+
# Set USE_SELF_HOSTED repository variable to 'true' when using self-hosted runners
50+
self-hosted: ${{ vars.USE_SELF_HOSTED == 'true' }}
51+
cache: ${{ vars.USE_SELF_HOSTED != 'true' }}
4852
secrets: "inherit"

0 commit comments

Comments
 (0)