Skip to content

Support self-hosted runner on linux-s390x platform #2263

Open

Description

@uweigand

Describe the enhancement
We've received requests from various open-source projects hosted on GitHub that would like to support Linux on IBM zSystems (the s390x architecture), but would prefer to integrate the platform into their existing GitHub action based CI environment to do so.

Our platform is not currently supported by any GitHub hosted runner, and it the runner source code (in this repo) does not build and work out of the box on our platform either. The intent of this feature request is to propose, discuss and agree upon changes to the runner code to make the latter possible.

Additional information
The major dependency of the runner is of course .NET support. Our platform has been supported by the .NET open-source project since the .NET 6 release (using a RID of linux-s390x). However, this is considered a "community-supported" platform by Microsoft, which means in particular that Microsoft does not provide and/or support binary builds of the .NET SDK and runtime for the platform.

However, it is possible to build the .NET SDK and runtime from source, and several Linux distributions are already doing so, providing a set of .NET packages that work on s390x. This currently applies to RHEL, Fedora, and Alpine - with hopefully more to follow.

Using those packages, it is possible to build the runner. However, this does not quite work out of the box, since there are some differences between using distro-provided packages and using the Microsoft builds (which the runner build process currently relies on):

  • 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.
  • 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.
  • Finally, the global.json script requires a minimum .NET version of 6.0.300 to build the runner application. The distro-provided packages are generated using the "source-build" method, which currently only supports building the 6.0.1xx feature band, so there is no 6.0.300 available.

In addition to changes required to handle the above differences, we've needed to make several further changes:

  • Various changes to make the code aware of the new architecture (e.g. a new member of Constants.Architecture enum).
  • Redistributing the s390x 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.

I'll open a draft PR shortly that includes a set of changes addressing all the above. Using this PR I'm able to build current mainline and successfully execute the test suite (using the dotnet packages on a s390x RHEL 8.6 system):

  Passed!  - Failed:     0, Passed:   549, Skipped:     0, Total:   549, Duration: 31 s - /home/uweigand/runner/src/Test/bin/Debug/net6.0/Test.dll (net6.0)

Some of the changes will definitely need further rework to become acceptable for upstream inclusion. I'll 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 s390x 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.

Activity

  1. added
    enhancement
    on Nov 16, 2022
  2. chantra commented on Nov 16, 2022

    @chantra

    I am very much looking forward being able to run actions-runner natively on s390x.

    Being able to run on s390x, on top of testing the architecture itself, allows us to ensure that the code does not assume a specific endianess as now the code can be built and tested on both little-endian arch (x86) and big-endian arch (s390x).

    This is critical for any system softwares, any protocol development, or anything touching network wire-format in general.

    For kernel related projects, this helps ensure that developers can easily have their changes tested on multiple architectures and are not inadvertently breaking other arch.

    Again, this support would be greatly appreciated.

  3. SaileshBellamkonda commented on Jun 7, 2023

    @SaileshBellamkonda

    GitHub Action for s390x architecture (Experimental) version is available at Gold-Bull/github-actions-runner.

    Currently auto-updates are not available.

  4. chantra commented on Oct 19, 2023

    @chantra

    GitHub Action for s390x architecture (Experimental) version is available at Gold-Bull/github-actions-runner.

    Currently auto-updates are not available.

    Thanks @SaileshBellamkonda

    It would be great to get this officially released by the authoritative repo though.

    @TingluoHuang is there a chance to get this as part of official releases?

    s390x is very useful to test big-endian architectures.

  5. huoqifeng commented on Feb 19, 2024

    @huoqifeng

    I appreciate the efforts in the PR #2264 to make it possible to support s390x in runner, it would be great if it can be included in the features list. @TingluoHuang @thboop @fhammerl @nikola-jokic is it possible the PR get reviewed and committed if there is no problem?

  6. tannevaled commented on Jul 3, 2026

    @tannevaled

    Since PR #2264 has been closed, I've published a fresh port of the current baseline (v2.335.1) to linux-s390x built natively on real IBM z15 (Ubuntu 24.04, .NET 8.0.128 from apt):

    Verification:

    • Build: ./dev.sh layout linux-s390x succeeds
    • dotnet bin/Runner.Listener.dll --version → 2.335.1
    • Publishes non-self-contained (no nuget.org apphost/runtime packages for s390x); host needs dotnet-runtime-8.0 from apt

    Deltas vs the original PR:

    1. Node.js 20.20.2 + 24.16.0 s390x binaries (upstream moved from node12/16)
    2. dev.sh: skip dotnet-install.sh on s390x, rely on the apt-installed dotnet-sdk-8.0 (Ubuntu 24.04 ships it natively — no community/IBM download step)
    3. global.json: rollForward: latestFeature so any 8.0.x SDK works (Ubuntu ships 8.0.128, upstream pins 8.0.421)
    4. Test file changes trimmed: PackagesTrimL0.cs no longer exists in v2.335.1, StepHostL0.cs arch-specific tests moved
    5. SelfUpdaterL0 gated #if !S390X (in-place self-update stays disabled — same limitation as Gold-Bull's fork)

    Happy to open a PR against main if the door is open on the upstream side; otherwise this fork tracks v2.335.1 and can be rebased on new upstream releases as they land. .NET 8+ has upstream s390x support (see dotnet/runtime#105311 + related — all arch-s390x-labeled and fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions