Has anyone been able to make a github actions workflow that builds a project for aarch64 and then uploads the build artifact to a cache? If so, I’d love a link.
For x86_64, I’ve had a great experience with @domenkozar’s cachix/install-nix-action and cachix/cachix-action components, which are extremely simple to use. But with respect to cross-compiling and/or running nix inside some kind of QEMU container (?) so that it’d be aarch64, I’m a newbie.
The end goal would be to have my project compiled for aarch64 in a github action workflow and uploaded to cachix such that workers running on AWS Gravitron2-based instances can then download from the cachix cache.
For the build part I used srid’s neuron github actions to add an aarch64 branch. The build runs but I never made it run through as free minutes in gh ran out. To have the binaries copied to a cache you’d probably have to add something like this to your build defintion.
Sorry for bumping an old thread, but it came out first in my Google results, so I thought I’d add my two cents. Thank you so much for the sample, @rmcgibbo; that helped a lot! The Nix options can now be declared in cachix/install-nix-action with an extra_nix_config input, so one can avoid written themselves to /etc/nix/nix.conf or passing arguments to the Nix commands. The following minimal example works like a charm for my use case (building a NixOS configuration for an ARM machine):