-
Notifications
You must be signed in to change notification settings - Fork 23
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
[BUG] Using bash -l {0}
as the default shell causes the pre-installed Julia to take precedence over the setup-julia
-installed Julia
#89
Comments
No, that's a bug. The preinstalled Julia version should not prevail. Sounds like a PATH issue, I'll take a look. Thanks for the detailed bug report :) |
Thanks for looking into this. I am less confident about the probable cause now because I cannot find where I read that Julia 1.7 is in included in |
Oh, here it says that Julia 1.7 is in MacOS 11 image: https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md |
Do you have a link to your workflow run? I can't reproduce it using the same workflow you posted above: https://github.com/SaschaMann/actions-test/runs/4508514549?check_suite_focus=true |
I am having the same issue - conflicting julia versions between this action and preinstalled |
My repro was incomplete. I also had: defaults:
run:
shell: bash -l {0} After adding it I can reproduce it (it fails silently, but you can see that "Updating |
Note: Julia being installed natively on runners may seem like a win for Julia, but it causes a huge headache to people trying to test several Julia versions/builds. I am having the same kind of issue with conda's julia as well: the system's installation seem to take over. |
Go, Python, .NET languages etc. are all preinstalled too. The virtual environment is pretty massive. This issue isn't caused by it being preinstalled otherwise this would be a general problem with GHA that would make it useless for running CI. The issue is caused by the PATH handling of the actions and GHA itself. |
Thanks, with that example I can reproduce it. The cause of this problem is the The actions toolkit adds things to PATH using a workflow command internally: https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions#adding-a-system-path It also sets adds it to path in the step itself by modifying PATH, which is why If we inspect
Based on the content of Is there a specific reason why you need You can work around this by adding the following step to your workflow: - name: Add Julia to ~/.bashrc
env:
SETUP_JULIA_PATH: ${{ steps.setup-julia.outputs.julia-bindir }}
run: |
echo "export PATH=\"$SETUP_JULIA_PATH:\$PATH\"" >> "$HOME/.bashrc" and adding an - name: Install Julia
id: setup-julia
uses: julia-actions/setup-julia@v1
with:
version: '1.6' Given that setup-julia uses the recommended way to add things to PATH and it works using the standard shells that are available, imo fixing this is out of scope of the action. Messing with |
I can look into how other |
This seems like a problem with GitHub's internal implementation indeed. Is it something we should raise with GitHub Actions team?
Yes many other actions require it to be added because the software they install relies on the profile files getting loaded. Thank you for sharing the workaround. |
I think it's worth a try. It might be the intended behaviour too but it's worth raising it imo.
I see. I'll check out how other setup actions handle it but I'd also happy to add the workaround behind a flag now that I understand the use case. This might take some time though, so for an urgent fix please try the workaround for now. |
bash -l {0}
as the default shell causes the pre-installed Julia to take precedence over the setup-julia
-installed Julia
Describe the bug
To my surprise my build started failing due to a compilation issue/packages failing on Julia 1.7. I remember that one week ago I pinned Julia 1.6 version for now, but today I see this is failing again but only on MacOS. It seems that GitHub Actions are switching to a new version of MacOS (11) which maybe (?) includes a preinstalled Julia 1.7: actions/runner-images#4060 ?
To Reproduce
Workflow file to reproduce the behavior:
Expected behavior
Is this expected that the system-wide installation prevails? If yes, I would suggest adding a suggestion to uninstall system-native version on MacOS be added to the readme, otherwise I would just expect the action to take care of it (by making the path to the newly installed julia win out).
Screenshots/Build logs
Clearly system-wide 1.7 wins out:
The text was updated successfully, but these errors were encountered: