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

Prototype MacOS CI #542

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

DanLipsitt
Copy link

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).

Excluded the formatting test since it is unlikely to be platform-dependent.
@DavHau
Copy link
Member

DavHau commented Jul 4, 2023

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
Copy link
Member

DavHau commented Jul 4, 2023

@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.

@DanLipsitt
Copy link
Author

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.

@DavHau
Copy link
Member

DavHau commented Jul 4, 2023

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.

@phaer
Copy link
Member

phaer commented Jul 12, 2023

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: #576

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

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

Successfully merging this pull request may close these issues.

None yet

3 participants