From c12ce02684a9f7d09ee33e234a721f272cf75c37 Mon Sep 17 00:00:00 2001 From: Shahid Shaikh Date: Thu, 19 Oct 2023 08:01:09 +0000 Subject: [PATCH] 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 25798cc..48e06f5 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 e54146d..07340fd 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;