From c12ce02684a9f7d09ee33e234a721f272cf75c37 Mon Sep 17 00:00:00 2001 From: Shahid Shaikh Date: Thu, 19 Oct 2023 08:01:09 +0000 Subject: [PATCH 1/2] Add ppc64le support --- dist/setup/index.js | 14 ++++++++++---- src/system.ts | 12 +++++++++--- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 25798ccb6..48e06f5fd 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -61948,13 +61948,19 @@ function getArch(arch) { // 'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'. // wants amd64, 386, arm64, armv61, ppc641e, s390x // currently not supported by runner but future proofed mapping + let endianness = os_1.default.endianness(); switch (arch) { case 'x64': arch = 'amd64'; break; - // case 'ppc': - // arch = 'ppc64'; - // break; + case 'ppc64': + if(endianness=='LE') { + arch = 'ppc64le'; + } + else { + arch = 'ppc64'; + } + break; case 'x32': arch = '386'; break; @@ -62213,4 +62219,4 @@ main_1.run(); module.exports = __webpack_exports__; /******/ })() -; \ No newline at end of file +; diff --git a/src/system.ts b/src/system.ts index e54146da0..07340fd8f 100644 --- a/src/system.ts +++ b/src/system.ts @@ -20,13 +20,19 @@ export function getArch(arch: string): string { // wants amd64, 386, arm64, armv61, ppc641e, s390x // currently not supported by runner but future proofed mapping + let endianness: string = os.endianness(); switch (arch) { case 'x64': arch = 'amd64'; break; - // case 'ppc': - // arch = 'ppc64'; - // break; + case 'ppc64': + if(endianness=='LE') { + arch = 'ppc64le'; + } + else { + arch = 'ppc64'; + } + break; case 'x32': arch = '386'; break; From 599dc9e0fa458a88a1678215ebf9233aac37941c Mon Sep 17 00:00:00 2001 From: Shahid Shaikh Date: Mon, 23 Oct 2023 05:59:15 +0000 Subject: [PATCH 2/2] Fixed code style issues reported by Prettier --- dist/setup/index.js | 5 ++--- src/system.ts | 9 ++++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dist/setup/index.js b/dist/setup/index.js index 48e06f5fd..e9a3bdb53 100644 --- a/dist/setup/index.js +++ b/dist/setup/index.js @@ -61954,10 +61954,9 @@ function getArch(arch) { arch = 'amd64'; break; case 'ppc64': - if(endianness=='LE') { + if (endianness == 'LE') { arch = 'ppc64le'; - } - else { + } else { arch = 'ppc64'; } break; diff --git a/src/system.ts b/src/system.ts index 07340fd8f..96d23561d 100644 --- a/src/system.ts +++ b/src/system.ts @@ -26,11 +26,10 @@ export function getArch(arch: string): string { arch = 'amd64'; break; case 'ppc64': - if(endianness=='LE') { - arch = 'ppc64le'; - } - else { - arch = 'ppc64'; + if (endianness == 'LE') { + arch = 'ppc64le'; + } else { + arch = 'ppc64'; } break; case 'x32':