Skip to content

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

Merged
syeopite merged 8 commits into
iv-org:masterfrom
Fijxu:use-arm64-runner
Aug 23, 2025
Merged

syeopite merged 8 commits into
iv-org:masterfrom
Fijxu:use-arm64-runner

Conversation

@Fijxu

@Fijxu Fijxu commented May 15, 2025

Copy link
Copy Markdown
Member

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

Fijxu commented May 15, 2025

Copy link
Copy Markdown
Member Author

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.

Comment thread .github/workflows/ci.yml Outdated
Comment thread docker-compose-arm64.yml Outdated
Comment thread .github/workflows/build-nightly-container.yml Outdated
Fijxu added 4 commits May 15, 2025 15:28
Comment thread .github/workflows/ci.yml Outdated
matrix:
include:
- os: ubuntu-latest
docker_compose_file: "docker-compose.yml"

@Fijxu Fijxu May 15, 2025

Copy link
Copy Markdown
Member Author

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).

@syeopite syeopite left a comment

Copy link
Copy Markdown
Member

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

@syeopite syeopite left a comment

Copy link
Copy Markdown
Member

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

Fijxu commented May 15, 2025

Copy link
Copy Markdown
Member Author

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
Copy Markdown
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

Fijxu commented May 15, 2025

Copy link
Copy Markdown
Member Author

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

unixfox commented May 18, 2025

Copy link
Copy Markdown
Member

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

Fijxu commented May 18, 2025

Copy link
Copy Markdown
Member Author

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.

4 participants