Compare commits

..

1 Commits

Author SHA1 Message Date
Taiki Endo
09e69c431b shellcheck 2026-05-17 07:37:20 +00:00
3 changed files with 10 additions and 12 deletions

View File

@@ -10,8 +10,6 @@ Note: In this file, do not use the hard wrap in the middle of a sentence for com
## [Unreleased] ## [Unreleased]
- Support more host architectures. ([#1841](https://github.com/taiki-e/install-action/pull/1841), thanks @Gelbpunkt)
## [2.78.3] - 2026-05-17 ## [2.78.3] - 2026-05-17
- Update `zizmor@latest` to 1.25.2. - Update `zizmor@latest` to 1.25.2.

View File

@@ -4,8 +4,8 @@ description: GitHub Action for installing development tools
inputs: inputs:
tool: tool:
description: Tools to install (whitespace or comma separated list) description: Tools to install (whitespace or comma separated list)
required: true required: false
# default: #publish:tool default: shellcheck
checksum: checksum:
description: Whether to enable checksums (strongly discouraged to disable) description: Whether to enable checksums (strongly discouraged to disable)
required: false required: false

16
main.sh
View File

@@ -580,8 +580,7 @@ case "${RUNNER_OS}" in
esac esac
case "${RUNNER_ARCH}" in case "${RUNNER_ARCH}" in
X64) host_arch=x86_64 ;; X64) host_arch=x86_64 ;;
# Always fallback to `cargo install` on 32-bit Arm for now, as we need to # Ignore 32-bit Arm for now, as we need to consider the version and whether hard-float is supported.
# consider the version and whether hard-float is supported.
# https://github.com/rust-lang/rustup/pull/593 # https://github.com/rust-lang/rustup/pull/593
# https://github.com/cross-rs/cross/pull/1018 # https://github.com/cross-rs/cross/pull/1018
# And support for 32-bit Arm will be removed in near future. # And support for 32-bit Arm will be removed in near future.
@@ -589,22 +588,23 @@ case "${RUNNER_ARCH}" in
# Does it seem only armv7l+ is supported? # Does it seem only armv7l+ is supported?
# https://github.com/actions/runner/blob/v2.321.0/src/Misc/externals.sh#L178 # https://github.com/actions/runner/blob/v2.321.0/src/Misc/externals.sh#L178
# https://github.com/actions/runner/issues/688 # https://github.com/actions/runner/issues/688
ARM) host_arch=arm ;; ARM) bail "32-bit Arm runner is currently not supported; if you need support for this platform, please submit an issue at <https://github.com/taiki-e/install-action>" ;;
X86) host_arch=x86 ;; X86) bail "32-bit x86 runner is currently not supported; if you need support for this platform, please submit an issue at <https://github.com/taiki-e/install-action>" ;;
ARM64) host_arch=aarch64 ;; ARM64) host_arch=aarch64 ;;
PPC64LE) host_arch=powerpc64le ;; PPC64LE) host_arch=powerpc64le ;;
RISCV64) host_arch=riscv64 ;; RISCV64) host_arch=riscv64 ;;
S390X) host_arch=s390x ;; S390X) host_arch=s390x ;;
*) *)
info "unrecognized runner.arch '${RUNNER_ARCH}'; fallback to uname -m" info "unrecognized runner.arch '${RUNNER_ARCH}'; fallback to uname -m"
host_arch="$(uname -m)" case "$(uname -m)" in
case "${host_arch}" in
aarch64 | arm64) host_arch=aarch64 ;; aarch64 | arm64) host_arch=aarch64 ;;
xscale | arm | armv*l) bail "32-bit Arm runner is currently not supported; if you need support for this platform, please submit an issue at <https://github.com/taiki-e/install-action>" ;;
ppc64le) host_arch=powerpc64le ;; ppc64le) host_arch=powerpc64le ;;
riscv64) host_arch=riscv64 ;; riscv64) host_arch=riscv64 ;;
s390x) host_arch=s390x ;; s390x) host_arch=s390x ;;
# On these platforms, we just use the result of `uname -m` as host_arch, and always fallback to `cargo install`. # Very few tools provide prebuilt binaries for these.
xscale | arm | armv*l | loongarch64 | mips | mips64 | ppc | ppc64 | sun4v) ;; # TODO: fallback to `cargo install`? (binstall fallback is not good idea here as cargo-binstall doesn't provide prebuilt binaries for these.)
loongarch64 | mips | mips64 | ppc | ppc64 | sun4v) bail "$(uname -m) runner is not supported yet; please submit an issue at <https://github.com/taiki-e/install-action>" ;;
# GitHub Actions Runner supports x86_64/AArch64/Arm Linux and x86_64/AArch64 Windows/macOS. # GitHub Actions Runner supports x86_64/AArch64/Arm Linux and x86_64/AArch64 Windows/macOS.
# https://github.com/actions/runner/blob/v2.332.0/.github/workflows/build.yml#L24 # https://github.com/actions/runner/blob/v2.332.0/.github/workflows/build.yml#L24
# https://docs.github.com/en/actions/reference/runners/self-hosted-runners#supported-processor-architectures # https://docs.github.com/en/actions/reference/runners/self-hosted-runners#supported-processor-architectures