ARM builds

I’m trying to build deb packages for arm. I already do this for x86 in cci in ubuntu:xenial docker container. Locally on my mac I can use arm64v8/ubuntu:xenial and compile my code, but when I deploy to cci get a “successful” build that only run the “Spin up Environment” which downloads the container but never goes to checkout code. (I’ve confirmed the yaml configuration has the steps, and the same config works when I swtch image back to ubutnu:xenial)

Guessing has something to do with the VM’s not able to run arm code? has anyone done this before? what about switching to machine executor?

1 Like

That is exactly it. This isn’t something we currently support https://support.circleci.com/hc/en-us/articles/360018651374-Job-completes-after-Spin-up-Environment-for-non-x86-based-Docker-images-

We have a request for it linked in the article.

I’m not sure if you could do this on machine, I expect not, but I don’t know if it’s been tried.

damn, that’s unfortunate. now that ec2 supports this (arm instances) it would be a nice feature to add along with your machine sizes.

It would, which is why we have the feature request. Please vote to show interest and let our product team know and and maybe we can make this happen if there is enough need.

done,

additionally shouldn’t the build fail here? seems like a bug that this build is a success if the container fails to start.

It starts…and then instantly exits, iirc from testing. I know @KyleTryon did most of the testing, but I think it would require changes to our codebase to treat it as a failure. Normally it would trigger an infrastructure failure loop, which is probably less what we want. :smiley:

yeah understand that there might be ramifications to the fix. but my point is only that it’s not a successful build, so not ideal to call it a success either.

I could keep dreaming too that some day there will be a 3rd state to your build system :slight_smile: . ie: skipped or similar

Agreed. Turns out Kyle already filed an internal bug for that exact point, I’ve attached this thread to it for added visibility.

2 Likes

So I have figure out how to run arm docker containers, seems you could help run arm contains on your end by running this command before you run the container

docker run --rm --privileged multiarch/qemu-user-static:register

I can start a container, then run the command above then docker run my arm build container. I’m gonna explore this route more.

but consider if possible to allowing us to run that or something similar before the container starts

We can’t let you run --privileged Docker containers, as that would gave you access to the host machine and be able to access other’s jobs.

This is something you could do with our Server platflorm, since it’s self-hosted, but on Cloud it’s a bit trickier.

not sure that is required --privileged that was just from the docs of that particular qemu example.

as I mentioned I’m able to run this fine/without in an existing circle ci container after setup_remote_docker

ie:

  steps:
    - checkout
    - setup_remote_docker:
    - run:
        command: |
          docker run --rm --privileged multiarch/qemu-user-static:register
          docker build . # (w/ FROM from any arm like multiarch/ubuntu-core:arm64-xenial)

Sorry, I misunderstood and thought you were running this locally.

Can you share this information on the idea https://ideas.circleci.com/ideas/CCI-I-900, please? :slight_smile:

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.