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

Setup fails on persistent runner when julia version updates #32

Closed
IanButterworth opened this issue May 28, 2020 · 5 comments · Fixed by #46
Closed

Setup fails on persistent runner when julia version updates #32

IanButterworth opened this issue May 28, 2020 · 5 comments · Fixed by #46
Assignees
Labels
bug Something isn't working

Comments

@IanButterworth
Copy link
Member

I have a self-hosted runner that persists between runs, which usually works with the setup-julia step.

However, when the julia version updates I get:

mkdir /home/ubuntu/julia
mkdir: cannot create directory ‘/home/ubuntu/julia’: File exists
##[error]The process 'mkdir' failed with exit code 1

I guess there are two options:

  1. Delete the /julia dir before upgrade
  2. Change to versioned /julia1.4.2 dirs, but point a symlink from julia to the requested version
@SaschaMann SaschaMann self-assigned this May 28, 2020
@SaschaMann SaschaMann added the bug Something isn't working label May 28, 2020
@SaschaMann
Copy link
Member

SaschaMann commented May 28, 2020

Thanks for reporting this issue. I didn't know persistent build environments are even a thing :D The 2nd suggestion sounds good to me, I'll implement it over the weekend.

@SaschaMann
Copy link
Member

SaschaMann commented Jun 1, 2020

It'll take a bit longer. I want to add some checks that the correct version is in the path even when multiple versions of Julia are installed but I have to read up on how the testing framework actions use works to do it properly.

@SaschaMann
Copy link
Member

Sorry, I haven't had enough time to finish it yet, so the next Julia update will break it once more. I'm still trying to understand the test framework and I'm a bit hesitant to change the install directory if I can't test it well because that could break hundreds of builds.

@SaschaMann
Copy link
Member

SaschaMann commented Sep 26, 2020

Sorry that it took me a lot longer, #46 should fix it.

I misused tool-cache before and effectively had two locations where Julia was installed. GitHub's tool-cache will handle the directories, as it has before, and Julia will be installed in /opt/hostedtoolcache/version/arch, e.g. /opt/hostedtoolcache/julia/1.0.5/x64. The difference is that the temporary directory where setup-julia installs it in, previously ~/julia, will now be a temporary directory and deleted once Julia has been installed to the tool-cache.

A follow-up PR will also check that if Julia has been installed already that version will be used, rather than reinstalling it. That should speed up builds on persistent runners significantly. This is already the case.

I don't have access to a self-hosted runner, so please let me know if this works once the next Julia version comes out.

@IanButterworth
Copy link
Member Author

Thanks! It's actually super easy to set up your local machine as a self hosted runner, if you wanted to try it out.

I'll give it a go with ours and report back

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants