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

ci.yml: use sysctl -n hw.logicalcpu instead of nproc on macos #2982

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

emanuele6
Copy link
Member

The "macos (arm64)" runner on github does not have nproc.

/Users/runner/work/_temp/f44f0d9f-19eb-4a23-860e-26533d7efdfa.sh: line 10: nproc: command not found

The "macos (arm64)" runner on github does not have nproc.

/Users/runner/work/_temp/f44f0d9f-19eb-4a23-860e-26533d7efdfa.sh: line 10: nproc: command not found
Copy link
Member

@wader wader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it somehow worked anyway?

@emanuele6
Copy link
Member Author

make -j's argument is optional in some make; e.g. in GNU make if you omit it -j it runs jobs in parallel with no limit.

Maybe macos uses GNU make?

@wader
Copy link
Member

wader commented Dec 11, 2023

Aha it ended up with no stdout output on error

@emanuele6
Copy link
Member Author

emanuele6 commented Dec 11, 2023

Yes, it would have not have worked if macos was using BSD make for example:

$ bmake -j"$(false)"
bmake: option requires an argument -- j
usage: bmake [-BeikNnqrSstWwX]
            [-C directory] [-D variable] [-d flags] [-f makefile]
            [-I directory] [-J private] [-j max_jobs] [-m directory] [-T file]
            [-V variable] [-v variable] [variable=value] [target ...]

@emanuele6 emanuele6 merged commit 19453a6 into jqlang:master Dec 11, 2023
28 checks passed
@emanuele6 emanuele6 deleted the macosnproc branch December 11, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants