dream2nix icon indicating copy to clipboard operation
dream2nix copied to clipboard

Prototype MacOS CI

Open DanLipsitt opened this issue 1 year ago • 5 comments

This PR sets up Github Actions CI for MacOS. It uses a build matrix to run on both Mac and Linux builders. I've made some changes that affect the Linux build in the interest of getting this prototype working. If people are interested in this addition, I can go back add the conditional settings that will make the Linux build behave as it did before.

Changes

  • Run all tests except tests-format on both Mac and Linux. That one doesn't appear to be platform-specific.
  • Upgrade cachix/install-nix-action to v22. The release notes mention a MacOS issue with previous versions.
  • Un-pin nixpkgs. The pinned version broke the Mac build.

Discussion

I'm new to Nix, so I don't fully understand how requesting a specific nixpkgs version in the install phase interacts with the flake.lock. The Linux tests pass after unpinning. It seems like it would be good to test against unstable as well as the pinned version anyway. If we want, we can put both in the build matrix. This PR was motivated by #474. The CI jobs exhibit failures of several different kinds, so the PR uncovers at least one issue unrelated to #474 (and might not overlap with it at all).

DanLipsitt avatar Jun 30 '23 03:06 DanLipsitt

Thanks for this!

What is pinned through install_url is not the nixpkgs version but the nix version. Since you upgraded the action anyways, the pin is probably not required anymore.

DavHau avatar Jul 04 '23 16:07 DavHau

@DanLipsitt I just noticed that most of these tests will be deprecated as soon as we switch over to v1. Having functional CI pipelines for macos is still valuable but maybe it makes sense to wait until we have switched over, to prevent unnecessary work.

DavHau avatar Jul 04 '23 18:07 DavHau

Thanks, @DavHau. Is there a v1 branch where it would make more sense to do this? I see @phaer's v1-test-runner branch and your new actions-macos-dave. I don't mind doing extra work if it will be useful to build on later, but I'm also happy to leave it to others if it's already being taken care of.

DanLipsitt avatar Jul 04 '23 18:07 DanLipsitt

The v1 code is living on main under the subdir v1/. The only tests for v1 are example packages defined under v1/nix/modules/drvs and are exposed via the main flake.

You might want to play with it a little and track our progress via the issue linked above.

During the next few days we plan to create more detailed issues and probably a project board for moving v1 forward. After that it should be easier to see how to get involved.

DavHau avatar Jul 04 '23 19:07 DavHau

Hello & thanks for your contribution @DanLipsitt !

It's a bit unlucky timing, due to the v1 switch as @DavHau wrote. We also started to use nix-community's hercules-ci.com account for a nix-native CI infra. Hercules also has the advantage that we got an aarch64-darwin builder there, which github actions doesn't support afaik.

I've started a branch to use those builders and it seems to work well in principle, even though some jobs are still broken atm: https://github.com/nix-community/dream2nix/pull/576

So all in all I'd propose we continue with hercules ci and close this?

phaer avatar Jul 12 '23 12:07 phaer

We since have switched to a nix-community-hosted buildbot instance which features support for both aarch64-darwin and x86_64-darwin.

phaer avatar Jun 28 '24 19:06 phaer