Skip to content

cache is used even when cached=false #157

@rebeccamccabe

Description

@rebeccamccabe

I have a self hosted runner with the following workflow:

name: CI

on:
  push:
  workflow_dispatch:

jobs:
  build:
    runs-on: self-hosted

    steps:
      - name: Checkout branch
        uses: actions/checkout@v4
        if: always()
        with:
          path: MDOcean

      - name: Set up MATLAB
        uses: matlab-actions/setup-matlab@v2
        if: always()
        with:
            products: >
                Parallel_Computing_Toolbox
                Global_Optimization_Toolbox
                Optimization_Toolbox
                Statistics_and_Machine_Learning_Toolbox
                MATLAB_Report_Generator
                Simulink
                Simscape
                Simscape_Multibody

      - name: Run tests and generate artifacts
        uses: matlab-actions/run-command@v2
        if: always()
        with:
          command: cd("MDOcean"), addpath("tests"), run_tests

and I observe that setup-matlab finds a cache of matlab in the _work folder, even though cache is false:

Run matlab-actions/setup-matlab@v2
  with:
    products: Parallel_Computing_Toolbox Global_Optimization_Toolbox Optimization_Toolbox Statistics_and_Machine_Learning_Toolbox MATLAB_Report_Generator Simulink Simscape Simscape_Multibody
  
    release: latest
    cache: false
Setting up MATLAB
  Found MATLAB r2025a in cache at /home/becca/Documents/git/actions-runner/_work/_tool/MATLAB/2025.1.999/x64.
  /usr/bin/chmod +x /home/becca/Documents/git/actions-runner/_work/_tool/matlab-batch/v1/x64/matlab-batch

This is creating an issue where the subsequent run command hangs indefinitely until the action times out, perhaps because it isn't able to locate the right version of matlab on the path. This also only started becoming an issue for me sometime between 7/17/25 and 7/28/25, and my workflow hasn't been modified in that time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions