-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add Python/Ruby/Dotnet support to GHA runner image #11
base: main
Are you sure you want to change the base?
Conversation
@anup-kodlekere @nealef Please take a look at the code changes and let me know if there are any suggestions/comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- What's the convert rpm script for?
- The python install appears to have ppc64le hard-coded.
- Have you checked the various distro repost for multiple releases of python then using pyvirt or alternative to switch between them.
- Similar story for ruby
- The ruby installation script appears to assume Ubuntu as it is using apt
@nealef Thanks for reviewing the PR and providing really good suggestions. Please find my comments inline.
The
This a good point. We can make it configurable to support more than one architecture. Will update this in next PR.
To make GHA runner pickup Python binary from cache, we have to provide it beforehand at specific location with specific files and directory hierarchy. I don't think we can use pyvirt in this case, have not tried it though but looking at runner behavior, I believe it'll not work.
Same explanation as above for Python.
As of now ruby installation script is getting called in the |
But why are you using rpm2cpio etc.? The existing code converted the rpms to debs and then used apt-get to install them. Your script appears to put stuff in /opt rather than just let apt-get put it where the package defines.
I'll add comments for the other points later.
|
As I said in my earlier comment (for Python),
So in order to provide dotnet setup beforehand to GHA runner, I am extracting dotnet rpm's using rpm2cpio and then copying to I agree that with this approach we'll have two installations for dotnet but I couldn't think of any better workaround for now. |
The question it now raises is why DOTNET_INSTALL_DIR is set to /opt/dotnet instead of /usr/bin?
|
I did tried that and it didn't worked. From this behavior, I can say that GHA runner does not check only for the dotnet binary but also the whole installation files in specific dir structure and format like below:
|
In which case you want to set it to /usr/lib64/dotnet.
|
Oh yes! Good catch! I'll test with DOTNET_INSTALL_DIR set to /usr/lib64/dotnet. Will update the PR, if this works. |
9181993
to
fe21a51
Compare
@shahidhs-ibm have we tested this with an actual workflow? If so, can you point me to the logs? |
@nealef Have incorporated the changes suggested in review comments. Kindly check. @anup-kodlekere I have tried few random Python/Ruby/dotnet repos: |
@shahidhs-ibm can you also try a simple matrix job? I'm interested to see what the workflow file for that will look like. |
Note, you may also want to install multiple dotnet SDKs (i.e. for s390x adding 7 and 8; for ppc64le adding 8). They are happy to co-exist and any repo that builds with dotnet will be able to find and use it. |
@anup-kodlekere Feel free to try any workflow by yourself as I am not aware of many real-time github repos which can address your use case. Let me know if you have any particular repo to try. |
This seems like a good use case? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also cater for opensuse? We have in the rest of the system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a talk with Anup and he said we are not planning to support opensuse for ppc64le at least for the initial release. I have asked him to remove opensuse support as the present code is giving wrong impression to user.
@anup-kodlekere Please create a PR for removing opensuse from the code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make it a single PR so that we can revisit and revert that to re-instate the opensuse code.
Thanks Neale, I wasn't aware of this. I tried it out and it seems working. However, in order to use multiple dotnet SDKs in GHA workflow we'll have to tell user to create temporary global.json specifying which dotnet version they want to use. Does that sound ok? I hope that will not make user confuse. WDYT? |
The globals.json should only be being used when the action runner stuff is built. When the runner is actually used I don't think it's needed. |
@nealef Pushed new commit for multiple dotnet support. Kindly check and test for s390x. Test build is here for reference. |
@anup-kodlekere Check it out - https://github.com/shahidhs-ibm/gunicorn/actions/runs/8371642249 |
@nealef Thanks for reviewing the code changes, appreciated! I have incorporated all review comments suggested by you. Please let me know if you have any more review comment/ suggestion. Also let us know if you have tested it on s390x and provide us the feedback. |
Can you include the original x86 jobs as well? The whole idea behind this exercise was to see how the workflow file changes with the addition of the I'm just spitballing here, but I assume instead of using |
@anup-kodlekere It would be great if you try out by yourself. I'd be happy to help. |
Adds following tools/compilers support in runner images which makes GHA runner to pick them up from cache dir:
Python:
3.8.18, 3.10.13, 3.12.1
Ruby:
3.0.6, 3.1.4, 3.2.3, 3.3.0, jruby-9.4.5.0, mruby-3.2.0
(Ruby versions listed byruby-build --list
from ruby-build-v20240119.tar.gz excludingpicoruby
andtruffleruby
)Dotnet: (this version will always be equal to the dotnet version getting fetched and installed in
build-files/convert-rpm.sh
)For Ubuntu 22:
7.0.115, 8.0.101
For Almalinux 9:
7.0.117, 8.0.103
Note: For
build-selfhosted.sh
, the support has been added for Ubuntu and Almalinux only. Opensuse distro is not supported currently.