Skip to content

CI: Try to use macos-latest on arm64 to build arm images #144

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

Closed
wants to merge 4 commits into from

Conversation

larskanis
Copy link
Member

Based on #140 . No idea if it works - I don't have a Mac.

…NG.md

And add a buildkit config which disables the garbage collection of the cache.
Our images are too many and too fat, so that it gets deleted half way otherwise.
This way we can provide images for Intel/AMD based as well as ARM based systems.

Image building is now prefixed by the host architecture "arm" or "x86" and the local host arch is loaded after build:

```
rake build:arm:arm-linux-musl      # Build and load image for platform arm-linux-musl on linux/arm64
rake build:arm:arm64-darwin        # Build and load image for platform arm64-darwin on linux/arm64
rake build:arm:jruby               # Build and load image for JRuby on linux/arm64
```

The foreign architecture is only built:

```
rake build:x86:arm-linux-musl      # Build image for platform arm-linux-musl on linux/amd64
rake build:x86:arm64-darwin        # Build image for platform arm64-darwin on linux/amd64
rake build:x86:jruby               # Build image for JRuby on linux/amd64
```

Only `docker buildx build` supports multiple platforms, so that it is used now, instead of the classic `docker build`.

The number of images doubles with this patch, so that I get errors building all in parallel.
Therefore the number of parallel tasks should be limited like:

```
rake -j10 build:all
```
@larskanis
Copy link
Member Author

I started a naive attempt to run docker in github actions on macos-14 running ARM64, but it fails when starting the VM:

error starting vm: error at 'creating and starting': exit status 1

On the other hand I found an Github action which is to setup docker on macos, but it isn't supported on ARM64, since neither the hardware nor the software supports it currently: https://github.com/marketplace/actions/setup-docker-on-macos

So this way is not usable for now and the near future to build ARM64 images for rake-compiler-dock.

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

Successfully merging this pull request may close these issues.

1 participant