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

Add support for arm64 Linux and Windows GitHub hosted runners #848

Open
LorenzoRogai opened this issue Jun 3, 2024 · 9 comments
Open

Add support for arm64 Linux and Windows GitHub hosted runners #848

LorenzoRogai opened this issue Jun 3, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@LorenzoRogai
Copy link

LorenzoRogai commented Jun 3, 2024

Github released arm64 hosted runners

https://github.blog/changelog/2024-06-03-actions-arm-based-linux-and-windows-runners-are-now-in-public-beta

The install process goes slow then fails with this error

/home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/tools/add_tools.sh: line 31: /usr/bin/php: cannot execute binary file: Exec format error
@LorenzoRogai LorenzoRogai added the bug Something isn't working label Jun 3, 2024
@shivammathur
Copy link
Owner

Those are not supported by the action currently.

I will try to add support in future, but no promises until it only supports large runners.

@LorenzoRogai
Copy link
Author

LorenzoRogai commented Jun 4, 2024

Thank you for your response. They are configurable inside large runners section instead of a fixed default GitHub runs-on tag but already available to all customers on Team/Enterprise plans. Considering that these runners also cost 0.005€ instead of 0.008€ i think that many ppl will switch to them

@shivammathur shivammathur added enhancement New feature or request and removed bug Something isn't working labels Jun 10, 2024
@shivammathur shivammathur changed the title Broken with arm64 GitHub hosted runners Add support for arm64 Linux and Windows GitHub hosted runners Jun 10, 2024
@LorenzoRogai
Copy link
Author

@shivammathur are there any guide on how to implement a new runs-on platform? so i can help by submitting a PR

@shivammathur
Copy link
Owner

shivammathur commented Aug 9, 2024

@LorenzoRogai
It would require adding support for arm builds here https://github.com/shivammathur/php-builder for linux. On Windows php does not support arm as of now as there are no arm builds, so I'm not sure, will have to test if existing x64 builds work on Windows.

@EionRobb
Copy link

EionRobb commented Sep 3, 2024

arm64 images have come out of public beta and are now in general availability https://github.blog/changelog/2024-09-03-github-actions-arm64-linux-and-windows-runners-are-now-generally-available/

We get a little further on our arm64 build (adding for googleibility):

Run shivammathur/setup-php@v2
/usr/bin/bash /home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/run.sh
==> Setup PHP
✓ PHP Installed PHP 8.2.21
==> Setup Extensions
/home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/extensions/add_extensions.sh: line 13: /usr/bin/php: cannot execute binary file: Exec format error
/home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/extensions/add_extensions.sh: line 16: /usr/bin/php: cannot execute binary file: Exec format error
/home/runner/work/_actions/shivammathur/setup-php/v2/src/scripts/../scripts/extensions/add_extensions.sh: line 16: /usr/bin/php: cannot execute binary file: Exec format error
Error: The operation was canceled.

@j-fulbright
Copy link

Following up here, as we'd like to move to support them as well

@LorenzoRogai
Copy link
Author

LorenzoRogai commented Sep 10, 2024

At the end we just changed the workflow to use ppa:ondrej/php, if you have a simple PHP setup you can do this way. It worked fine anyway

@ihor-sviziev
Copy link

@LorenzoRogai, chould you please share an example of how you did it?

@LorenzoRogai
Copy link
Author

LorenzoRogai commented Sep 17, 2024

@ihor-sviziev

Simply

- name: Add PHP PPA
  run: sudo add-apt-repository ppa:ondrej/php
- name: Install PHP
  run: |
    sudo apt install \
    php$(cat .php-version) \
    php$(cat .php-version)-simplexml \
    php$(cat .php-version)-curl \
    php$(cat .php-version)-dom \
    php$(cat .php-version)-xml \
    php$(cat .php-version)-bcmath \
    php$(cat .php-version)-zip \
    php$(cat .php-version)-intl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants