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

Integrate aarch64 into the building /release process #125

Open
2 tasks
beta-ziliani opened this issue Aug 31, 2021 · 6 comments
Open
2 tasks

Integrate aarch64 into the building /release process #125

beta-ziliani opened this issue Aug 31, 2021 · 6 comments

Comments

@beta-ziliani
Copy link
Member

Right now aarc64 tasks are run by CI, but they aren't really part of the build process.

@straight-shoota
Copy link
Member

It seems like circli has arm support now: https://circleci.com/build-environments/arm/
That should make this easier.

@jhass
Copy link
Member

jhass commented Sep 2, 2021

What was the reason again that we keep circle around for only the release builds?

Anyhow, not that setting up a self hosted runner for it on our build machine should be too difficult https://circleci.com/docs/2.0/runner-overview/

@beta-ziliani
Copy link
Member Author

Unfortunately we can't run self-hosted runners on Circle CI. About why use Circle CI only for release builds is merely a matter of balancing the workload.

@stakach
Copy link

stakach commented Nov 1, 2022

84codes provides a range of multi-arch images
https://hub.docker.com/r/84codes/crystal/tags

They also have multi-arch packages for most linux distros
https://github.com/84codes/crystal-container-images
So you can easily add the deb package and install crystal on a raspberry pi for example

@bendangelo
Copy link

bendangelo commented Jan 23, 2024

Hi, I'm having some issues using 84codes crystal base images (because they have arm64 versions).

Edit: For get that comment, the 84codes images entrypoint is different from the crystal base image. I've fixed the issue on my end.

@mloughran
Copy link

I settled on using alpine's crystal binaries, and have had no issues whatsoever (having also had some different issues with the 84codes images).

Our Dockerfile looks like this, but you could simplify (and remove static build dependencies) if you don't care about having a separate build container, or use alpine:edge if you'd rather use the latest crystal than an alpine release branch (see packages):

FROM alpine:3.19 as build
RUN apk add crystal shards
RUN apk add openssl-dev yaml-dev zlib-dev \
  # Static build dependencies
  openssl-libs-static yaml-static zlib-static

WORKDIR /app
COPY shard.lock .
COPY shard.yml .
RUN shards install --production
COPY . .

RUN shards build <target> --static

FROM alpine:3.19
WORKDIR /
COPY --from=build /app/bin/<target> .
CMD ["/<target>"]

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

6 participants