Enable setting up of go on ppc64/ppc64le systems

This commit is contained in:
Kishen Viswanathan 2024-11-22 18:18:36 +05:30
parent 3041bf56c9
commit f89ad3b87c
3 changed files with 39 additions and 8 deletions

View file

@ -18,15 +18,22 @@ export function getPlatform(): string {
export function getArch(arch: string): string {
// 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'.
// wants amd64, 386, arm64, armv61, ppc641e, s390x
// wants amd64, 386, arm64, armv6l, ppc64le, s390x
// currently not supported by runner but future proofed mapping
switch (arch) {
case 'x64':
arch = 'amd64';
break;
// case 'ppc':
// arch = 'ppc64';
// break;
// In case of ppc64, further distinction is needed to determine the endianness
// of the host as it can either be ppc64(Big Endian) or ppc64le (Little Endian) to download
// the correct bundle.
case 'ppc64':
if (os.endianness() === 'LE') {
arch = 'ppc64le';
} else {
arch = 'ppc64';
}
break;
case 'x32':
arch = '386';
break;