From d7f7ed0a70dc9284ffdbb802f1b83d373a855a1d Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Fri, 8 Aug 2025 20:00:21 -0400 Subject: [PATCH] Fix cache issues with self-hosted runners MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/Tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/Tests.yml b/.github/workflows/Tests.yml index 61f453f7c2..67c6806708 100644 --- a/.github/workflows/Tests.yml +++ b/.github/workflows/Tests.yml @@ -45,4 +45,8 @@ jobs: with: julia-version: "${{ matrix.version }}" group: "${{ matrix.group }}" + # Disable cache for self-hosted runners since they persist between runs + # Set USE_SELF_HOSTED repository variable to 'true' when using self-hosted runners + self-hosted: ${{ vars.USE_SELF_HOSTED == 'true' }} + cache: ${{ vars.USE_SELF_HOSTED != 'true' }} secrets: "inherit"