Conversation
|
fyi @MattSturgeon |
MattSturgeon
left a comment
There was a problem hiding this comment.
Looks good, thanks for continuing with this 🚀
I should be able to test it tomorrow, but no need to wait for me if you've done your own testing and are confident.
| ${{ (matrix.system == 'x86_64-linux' && 'ubuntu-latest') | ||
| || (matrix.system == 'aarch64-linux' && 'ubuntu-24.04-arm') | ||
| || (matrix.system == 'x86_64-darwin' && 'macos-13') | ||
| || (matrix.system == 'x86_64-darwin' && 'macos-latest') |
There was a problem hiding this comment.
I'm wondering if cross compiling from aarch64 to x86_64 will have any unforeseen consequences?
Although I believe some people use cross-comp with nixpkgs-review locally, so I guess it should be ok...
Have you used this for any builds? Did it work? Was it faster?
There was a problem hiding this comment.
I'm wondering if cross compiling from aarch64 to x86_64 will have any unforeseen consequences?
Is this really "cross compiling" though, if hostPlatform == buildPlatform == x86_64-darwin? I'm not sure how exactly this works but it looks like the mac cpu can run both aarch64 and x86_64 "natively".
Although I believe some people use cross-comp with nixpkgs-review locally, so I guess it should be ok...
This is also done on the darwin community builder, since there is only one aarch64 machine with extra-platforms = x86_64-darwin, so I think it should be fine.
Have you used this for any builds? Did it work? Was it faster?
I have tried this with a few builds, for some it was a bit faster, for others a bit slower, so afaict it doesn't seem to make a huge difference. The main reason why I decided to base this PR on #25 though was the significant speed up of the space reclaim step which now only takes about two minutes instead of eight/nine minutes.
There was a problem hiding this comment.
Makes sense. I'd forgotten that MacOS comes with this fancy Rosetta translation for x86 support.
So as far as nix is concerned, it isn't cross-comp; the cross-comp is being handled externally by Rosetta.
Important
Rosetta was designed to make the transition to Apple silicon easier, and we plan to make it available for the next two major macOS releases – through macOS 27.
Beyond this timeframe, we will keep a subset of Rosetta functionality aimed at supporting older unmaintained gaming titles, that rely on Intel-based frameworks.
So we may not have full support forever...
MattSturgeon
left a comment
There was a problem hiding this comment.
Tested here: https://github.com/MattSturgeon/nixpkgs-review-gha/actions/runs/16073289918
Everything seems to be working.
Use nothing-but-nix on linux and `rm -rf` on darwin Move nix's build-dir into /nix to workaround wimpysworld/nothing-but-nix#18 Co-authored-by: Matt Sturgeon <matt@sturgeon.me.uk>
Closes #9
Closes #22
Based on #25