runner icon indicating copy to clipboard operation
runner copied to clipboard

Support self-hosted runner on linux-ppc64le platform

Open Sapana-Khemkar opened this issue 2 years ago • 0 comments

Describe the enhancement

This is inline with enhancement issue https://github.com/actions/runner/issues/2263 There are multiple open source projects which are hosted on GitHub and they want to support power arch. But they want to use there existing GitHub action based CI environment. Power is currently not supported by action runner. We would like to add support for Power arch in action runner.

Additional information

dotnet7 is now supported on Power (ppc64le) platform which was major dependency for runner code. But it is community supported platform and hence Microsoft does not provide binary builds of the .NET SDK and runtime for the platform. But users can cross build and generate SDK and runtime packages or they can use dotnet sdk and runtime provided by RHEL. Using these packages locally we can build runner but with following limitation

  1. The dotnet-install.sh script used to download a pre-packaged SDK image does not work since Microsoft does not provide these pre-packaged images for community-supported architectures.
  2. The self-contained publish mode attempts to package a copy of the .NET runtime with the runner application. This works by downloading "generic" runtime packages (like Microsoft.NETCore.App.Runtime.$(RID)) from nuget.org. These are likewise not available for community-supported architectures.

In addition to changes required to handle the above differences, we have done following changes:

Various changes to make the code aware of the new architecture (e.g. a new member of Constants.Architecture enum). Redistributing the ppc64le version of the node.js runtime. Disable a few test cases for currently unsupported features. In particular, since at this point there are no pre-built binaries of the runner application itself provided by GitHub, the "self-update" mechanism does not work and cannot be tested. Migrating from dotnet6 to dotnet7 as ppc64le is supported from .NET7 onwards.

Below is test result

Passed! - Failed: 0, Passed: 549, Skipped: 0, Total: 549, Duration: 21 s - Test.dll (net7.0)

Some of the changes will definitely need further rework to become acceptable for upstream inclusion. We are be happy to work on that, but would appreciate input on how this should look like in the end. Thanks in advance for your help in supporting our platform!

Future direction

If we can get the above questions resolved and a PR accepted into mainline, users would be able to build the runner on ppc64le from source out of the box. However, it would be even more comfortable if pre-built binaries were available directly from GitHub. Not only would that make initial installation much easier, it would also enable the automated update process to work like it does on other platforms (at least for the runner application itself - for the dotnet runtime, the distro-specific updates would have to be used).

I understand this will likely not be available initially, but I'd also appreciate any comments on whether you see any possibility to get there in the future.

Sapana-Khemkar avatar Jan 11 '23 10:01 Sapana-Khemkar