Skip to content

Enable installation of go on ppc64/ppc64le systems #517

Open
@kishen-v

Description

Description:
Enable setup-go on ppc64le systems. I do see there is a block of code to related to this, which is commented.

setup-go/src/system.ts

Lines 27 to 29 in 41dfa10

// case 'ppc':
// arch = 'ppc64';
// break;

However, with NodeJS not having the capability to determine the endianness of the host using the generic os.arch() call, it is imperative to have os.endianness() differentiate and pick bundles for installation on ppc64/ppc64le systems.

I am using a self-hosted ppc64le system, on which the issue was observed.

Run actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed
  with:
    go-version: 1.[2](https://github.com/kishen-v/cri-o/actions/runs/11957574849/job/33337601992#step:3:2)3
    check-latest: false
    token: ***
    cache: true
  env:
    GO_VERSION: 1.2[3](https://github.com/kishen-v/cri-o/actions/runs/11957574849/job/33337601992#step:3:3)
    CONMON_BINARY: /usr/local/bin/conmon
Setup go version spec 1.23
Found in cache @ /home/ghrunner/runner/_layout/_work/_tool/go/1.23.3/ppc6[4](https://github.com/kishen-v/cri-o/actions/runs/11957574849/job/33337601992#step:3:4)
Added go to the path
Successfully set up Go version 1.23
/bin/sh: line 1: /home/ghrunner/runner/_layout/_work/_tool/go/1.23.3/ppc[6](https://github.com/kishen-v/cri-o/actions/runs/11957574849/job/33337601992#step:3:6)4/bin/go: cannot execute binary file: Exec format error
Error: Command failed: go env GOPATH
/bin/sh: line 1: /home/ghrunner/runner/_layout/_work/_tool/go/1.23.3/ppc64/bin/go: cannot execute binary file: Exec format error

Justification:
This change can help to install go on ppc64/ppc64le systems using setup-go, which are added as self-hosted runners.

Are you willing to submit a PR?
Yes.

Metadata

Assignees

No one assigned

    Labels

    feature requestNew feature or request to improve the current logic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions