Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MATLAB Cache fixes #107

Merged
merged 5 commits into from
Apr 11, 2024
Merged

MATLAB Cache fixes #107

merged 5 commits into from
Apr 11, 2024

Conversation

davidbuzinski
Copy link
Contributor

This PR addresses 2 issues:

src/install.unit.test.ts Outdated Show resolved Hide resolved
@davidbuzinski
Copy link
Contributor Author

davidbuzinski commented Apr 11, 2024

I made a few more changes:

  • In our Windows workaround I added the restore for tool cache into a try-finally block because if steps were failing we were leaving the tool cache as the wrong directory
  • If windows is not detected in the cache as completed due to missing .complete file or some other reason, we were getting problems with the symlinks against a partially completed install
  • add awaits for io.rmRF because I was seeing some weird control flow errors

src/matlab.ts Outdated Show resolved Hide resolved

return actualToolCacheDir;
} finally {
process.env['RUNNER_TOOL_CACHE'] = defaultToolCacheRoot;
Copy link
Member

@mcafaro mcafaro Apr 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this env variable changed above? I don't see it being used after it is change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess it's used by tc.cacheFile behind the scenes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used inside GitHub's tc.cacheFile code (and some of the other tool-cache functions) to locate the tool cache directory on the runner. We set it to the same location on D: to create/ link the install directory then we restore it to it's default C: location at the end.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess it's used by tc.cacheFile behind the scenes?

Yeah exactly

Co-authored-by: Mark Cafaro <[email protected]>
@davidbuzinski davidbuzinski merged commit 10404e3 into main Apr 11, 2024
9 checks passed
@davidbuzinski davidbuzinski deleted the cache-fix branch April 11, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants