andir / npins

Nix dependency pinning. Very similar to Niv but has a few features that I personally wanted.
European Union Public License 1.2
164 stars 12 forks source link

fix build on x86_64-darwin #80

Open fricklerhandwerk opened 1 month ago

fricklerhandwerk commented 1 month ago

also "works on my machine" now

andir commented 1 month ago

Should we add a Darwin build to CI? Does the free GHA plan allow this?

fricklerhandwerk commented 1 month ago

It seems they do: https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories

phanirithvij commented 1 month ago

@fricklerhandwerk does nix-build -A meta.tests work on your mac? It is failing in gha, I don't have a mac just used the gha to debug. (see actions in my fork)

fricklerhandwerk commented 1 month ago

@phanirithvij indeed, the network mocks seem to be failing, but at first glance that looks more like a race condition. Specifically, there's

OSError: [Errno 48] Address already in use
Connection to 127.0.0.1 8000 port [tcp/irdmi] succeeded!

... and then the git fetcher seems to get 404 on some items.

phanirithvij commented 1 month ago

I did some basic changes and here's the diff https://github.com/andir/npins/compare/master...phanirithvij:npins:drawin-ci-temp and the test is hanging https://github.com/phanirithvij/npins/actions/runs/9439870618/job/25998498494, not sure if it helps.

not helpful I have never owned/used a mac or plan to, I was just curious if I could get it working.

coreutils dependency is for the timeout command.

fricklerhandwerk commented 1 month ago

@phanirithvij thanks for taking a stab. The change doesn't seem to make a difference for me though.

andir commented 1 month ago

@phanirithvij indeed, the network mocks seem to be failing, but at first glance that looks more like a race condition. Specifically, there's

OSError: [Errno 48] Address already in use
Connection to 127.0.0.1 8000 port [tcp/irdmi] succeeded!

... and then the git fetcher seems to get 404 on some items.

Perhaps worth considering a random port for these kinds of tests. That might already fix it? not sure what might be running on random macos box without a sandbox.

phanirithvij commented 1 month ago

I changed the all the mkGitTest invocations to use a different port 9000 and the githubtest ones still use 8000. This change let the tests run but they didn't exit properly and I had to stop the workflow run after 30+ mins. (Not getting 404 anymore) https://github.com/andir/npins/pull/80#issuecomment-2157819821