Skip to content

CI: Use public ARM64 Github actions runners for ARM64 builds. #5305

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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

Fijxu
Copy link
Member

@Fijxu Fijxu commented May 15, 2025

Currently, Invidious uses QEMU to build it's ARM64 Invidious image, which is slow (since we are basically using a virtual machine).

This helps with the speed of building ARM64 binaries for Invidious on each release/commit by a lot.

More information about the public ARM64 runners here: https://github.com/orgs/community/discussions/148648


Take a look at: https://github.com/Fijxu/invidious/actions/runs/15037532092 and https://github.com/Fijxu/invidious/actions/runs/15037532093

Testing OCI images at https://git.nadeko.net/Fijxu/-/packages/container/invidious_do_not_pull/master-arm64 and https://git.nadeko.net/Fijxu/-/packages/container/invidious_do_not_pull/master

Currently, Invidious uses QEMU to build it's ARM64 Invidious image,
which is slow (since we are basically using a virtual machine).

This helps with the speed of building ARM64 binaries for Invidious
on each release/commit.

More information about the public ARM64 runners here:
https://github.com/orgs/community/discussions/148648

CI: Use ARM64 compose file for build-docker-arm64
@Fijxu Fijxu requested a review from a team as a code owner May 15, 2025 05:51
@Fijxu Fijxu requested review from SamantazFox and syeopite and removed request for a team and SamantazFox May 15, 2025 05:51
@Fijxu
Copy link
Member Author

Fijxu commented May 15, 2025

If possible, test the ARM64 OCI Image on a real ARM64 machine. I don't have access to one (well, my phone may work) and I would like to know if it works fine just as the QEMU built one.

Fijxu added 4 commits May 15, 2025 15:28
matrix:
include:
- os: ubuntu-latest
docker_compose_file: "docker-compose.yml"
Copy link
Member Author

@Fijxu Fijxu May 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker_compose_file: "docker-compose.yml" doesn't need to be specified, but makes it clearer to understand the job.

Fijxu added a commit to Fijxu/invidious that referenced this pull request May 15, 2025
…y or not

Depends on iv-org#5305

As discussed on
iv-org#5305 (comment), we
noticed that the `build-docker` job doesn't actually checks if Invidious
works or not, because curl always exited with code `0` (success) and the
current docker-compose.yml files have defaults that will make Invidious
fail at start (`hmac_key` and missing Invidious companion
configuration).
Copy link
Member

@syeopite syeopite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a name attribute to the CI docker test build jobs?

image

This is a bit hard to understand. Maybe something like Test ${{platform}} docker build

@Fijxu Fijxu requested a review from syeopite May 15, 2025 21:43
Copy link
Member

@syeopite syeopite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Looks good to me!

@Fijxu
Copy link
Member Author

Fijxu commented May 15, 2025

It still bothers me a little to have two docker-compose files, one for AMD64 and ARM64. For sure we can just use docker buildx build -t invidious_docker_build_image instead of docker compose -f composefile.yml build and replace

build:
context: .
dockerfile: docker/Dockerfile

To:

    image: invidious_docker_build_image

But I'm not sure :/, what do you think @syeopite

@syeopite
Copy link
Member

Considering there is only a single line difference between the two compose files I think the simplest solution is to literally just sed dockerfile: docker/Dockerfile to dockerfile: docker/Dockerfile.arm64 and then add this step:

- name: Use ARM64 Dockerfile if ARM64
  if: ${{name}} == "ARM64"
  run: sed -i 's/Dockerfile/Dockerfile.arm64/' docker-compose.yml

@Fijxu
Copy link
Member Author

Fijxu commented May 15, 2025

Oh right... Dumb me.

@syeopite syeopite added need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something type:container Docker/k8s/helm labels May 16, 2025
@unixfox
Copy link
Member

unixfox commented May 18, 2025

Would be interesting to merge both amd64 and arm64 into a single docker image tag. That's what @inetol did here at SearXNG with two separate Dockerfile: searxng/searxng#4764

Maybe he can explain to us how to do :)?

@Fijxu
Copy link
Member Author

Fijxu commented May 18, 2025

Would be interesting to merge both amd64 and arm64 into a single docker image tag. That's what @inetol did here at SearXNG with two separate Dockerfile: searxng/searxng#4764

Maybe he can explain to us how to do :)?

Oh that should be easy (at least from what I know). But I would prefer to do that in another PR

@syeopite syeopite added the ready label Jun 12, 2025
@syeopite syeopite removed the need-testing This feature needs to be deployed and tested to see if it's working, and doesn't break something label Jun 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants