-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature: Add multi architecture support #10
Conversation
…hitecture-support feature: Add multi architecture support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this useful addition to the action. Please consider the comments below.
src/run.js
Outdated
@@ -5,28 +5,30 @@ import * as path from 'path'; | |||
async function run() { | |||
try { | |||
let version = core.getInput('gh-cli-version'); | |||
if (version) { | |||
await getGhCli(version); | |||
let architecture = core.getInput('gh-cli-arch'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Architecture might be auto-determined using process.arch
:
https://github.com/arimal199-org/install-gh-cli-action/blob/6f54d5c0fa0de0454b90299b8a143de624d0d737/src/run.js#L30
There is no runner executable for 386, so support for that can be dropped. Instead, process.arch can be checked for arm
and arm64
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dev-hanz-ops Tested so far on arm64
and amd64
architectures, sadly I don't have access to armv6
runner , to verify if it works there.
Updated readme and actual code to use process.arch and based on that downloads actual binary
…hitecture-support feature:enable multi architecture support
Thank you for the feedback. I updated my changes with your suggestions. |
src/run.js
Outdated
|
||
let architecture = process.arch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid this will not work. process.arch
returns x64 when we need amd64. you can give it another shot using below pseudocode
let architecture = "amd64"
if process.arch in ["arm", "arm64"] {
architecture = process.arch
}
can you please test the changes using at least one amd64 and one arm64 machine?
* feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture
#4) * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * feature: Add correct logic to pick up arm64 or amd64 architecture * fix: Update README.md that supports only amd64 and arm64 architectures
Sorry mate, it went lost after the holidays. Merging now |
….0 to 0.2.1 Bumps [dev-hanz-ops/install-gh-cli-action](https://github.com/dev-hanz- ops/install-gh-cli-action) from 0.2.0 to 0.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dev-hanz-ops/install-gh- cli-action/releases">dev-hanz-ops/install-gh-cli-action's releases</a>.</em></p> <blockquote> <h2>v0.2.1 - arm64 support</h2> <ul> <li>support arm64 architecture - <a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/pull/10">dev-hanz-ops/install-gh-cli-action#10</a> (by <a href="h ttps://github.com/whatthefinemanual"><code>@whatthefinemanual</code></a >)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/af38ce09b1ec248aeb08eea2b16bbecea9e059f8"><code>af38ce0</code></a> run build</li> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/eef2976cedc1da9b4b4eafcdf96655455d55ac73"><code>eef2976</code></a> feature: Add multi architecture support (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/issues/10">sagemath#10</a>)</li> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/2d19dc38f3a568abbd2a42dae05be5b83202f332"><code>2d19dc3</code></a> docs: update recomended action version (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/issues/8">sagemath#8</a>)</li> <li>See full diff in <a href="https://github.com/dev-hanz-ops/install- gh-cli-action/compare/v0.2.0...v0.2.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot- badges.githubapp.com/badges/compatibility_score?dependency-name=dev- hanz-ops/install-gh-cli-action&package-manager=github_actions&previous- version=0.2.0&new- version=0.2.1)](https://docs.github.com/en/github/managing-security- vulnerabilities/about-dependabot-security-updates#about-compatibility- scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> URL: sagemath#39352 Reported by: dependabot[bot] Reviewer(s): Dima Pasechnik
….0 to 0.2.1 Bumps [dev-hanz-ops/install-gh-cli-action](https://github.com/dev-hanz- ops/install-gh-cli-action) from 0.2.0 to 0.2.1. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/dev-hanz-ops/install-gh- cli-action/releases">dev-hanz-ops/install-gh-cli-action's releases</a>.</em></p> <blockquote> <h2>v0.2.1 - arm64 support</h2> <ul> <li>support arm64 architecture - <a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/pull/10">dev-hanz-ops/install-gh-cli-action#10</a> (by <a href="h ttps://github.com/whatthefinemanual"><code>@whatthefinemanual</code></a >)</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/af38ce09b1ec248aeb08eea2b16bbecea9e059f8"><code>af38ce0</code></a> run build</li> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/eef2976cedc1da9b4b4eafcdf96655455d55ac73"><code>eef2976</code></a> feature: Add multi architecture support (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/issues/10">sagemath#10</a>)</li> <li><a href="https://github.com/dev-hanz-ops/install-gh-cli-action/commi t/2d19dc38f3a568abbd2a42dae05be5b83202f332"><code>2d19dc3</code></a> docs: update recomended action version (<a href="https://redirect.github.com/dev-hanz-ops/install-gh-cli- action/issues/8">sagemath#8</a>)</li> <li>See full diff in <a href="https://github.com/dev-hanz-ops/install- gh-cli-action/compare/v0.2.0...v0.2.1">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot- badges.githubapp.com/badges/compatibility_score?dependency-name=dev- hanz-ops/install-gh-cli-action&package-manager=github_actions&previous- version=0.2.0&new- version=0.2.1)](https://docs.github.com/en/github/managing-security- vulnerabilities/about-dependabot-security-updates#about-compatibility- scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> URL: sagemath#39352 Reported by: dependabot[bot] Reviewer(s): Dima Pasechnik
Changes enable using this action also for different architectures.
Changes include: