Skip to content
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

Detect native arch dynamically #11

Open
zacksiri opened this issue Oct 22, 2023 · 3 comments
Open

Detect native arch dynamically #11

zacksiri opened this issue Oct 22, 2023 · 3 comments

Comments

@zacksiri
Copy link

Currently from what I read from the setup script. It seems anything which is not x86 will setup qemu. However in the use case where we're using a self hosted runner that the host is natively aarch64 it should not setup qemu.

@zacksiri
Copy link
Author

zacksiri commented Oct 22, 2023

If you can give me pointers I can probably handle this and submit a PR.

Update:

After some research can't we use uname -m to detect the architecture? If the argument passed in doesn't match we provision qemu.

@joeyparrish
Copy link

I have the same issue. This fails on my arm64 runner, because it can't execute the x86 binaries. And on this line:

if [[ "$INPUT_ARCH" != x86* ]]; then

it sets up qemu for any architecture that isn't x86. Instead, it should set up qemu for any architecture that isn't native.

@joeyparrish
Copy link

Also this default is a problem:

setup-alpine/action.yml

Lines 9 to 15 in 359b91e

apk-tools-url:
description: >
URL of the apk-tools static binary to use. It must end with `#!sha256!` followed by a SHA-256
hash of the file.
This should normally be left at the default value.
required: false
default: https://gitlab.alpinelinux.org/api/v4/projects/5/packages/generic/v2.14.0/x86_64/apk.static#!sha256!1c65115a425d049590bec7c729c7fd88357fbb090a6fc8c31d834d7b0bc7d6f2

It hard-codes for x86_64 binaries, and requires a sha256 to be valid.

jirutka added a commit that referenced this issue Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants