Compare commits

...

3 Commits
syft ... main

Author SHA1 Message Date
Taiki Endo
9dc19f4152 Update changelog 2026-05-17 17:47:05 +09:00
Taiki Endo
41960a65de Touch up PR 1841 2026-05-17 17:45:45 +09:00
Aelin
33f815d132 Always fall back to cargo install except on MIPS 2026-05-17 17:34:09 +09:00
2 changed files with 10 additions and 8 deletions

View File

@@ -10,6 +10,8 @@ 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.

16
main.sh
View File

@@ -580,7 +580,8 @@ case "${RUNNER_OS}" in
esac esac
case "${RUNNER_ARCH}" in case "${RUNNER_ARCH}" in
X64) host_arch=x86_64 ;; X64) host_arch=x86_64 ;;
# Ignore 32-bit Arm for now, as we need to consider the version and whether hard-float is supported. # Always fallback to `cargo install` on 32-bit Arm for now, as we need to
# 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.
@@ -588,23 +589,22 @@ 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) 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>" ;; ARM) host_arch=arm ;;
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>" ;; X86) host_arch=x86 ;;
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"
case "$(uname -m)" in host_arch="$(uname -m)"
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 ;;
# Very few tools provide prebuilt binaries for these. # On these platforms, we just use the result of `uname -m` as host_arch, and always fallback to `cargo install`.
# TODO: fallback to `cargo install`? (binstall fallback is not good idea here as cargo-binstall doesn't provide prebuilt binaries for these.) xscale | arm | armv*l | loongarch64 | mips | mips64 | ppc | ppc64 | sun4v) ;;
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