Define environment variable for overriding number of jobs #65
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm happy to discuss alternative solutions, I'm not married to this one in particular, but the problem I want to solve is to be able to spawn more jobs than what
default_njobswould do. SettingJULIA_CPU_THREADSonly affectsParallelTestRunner.jl/src/ParallelTestRunner.jl
Lines 361 to 363 in c79f4cc
memory_jobs. Perhaps an alternative solution is to be able to control the expected memory usage more easily, which at the moment is impossible.The only thing I like of using an environment variable to override the number of jobs is that that's easy to set in CI jobs, my main use case would be to have at least 2 parallel jobs on Apple Silicon macOS on GitHub-hosted runners, because at the moment we always get only one (3 CPUs and 7 GB of memory), which is a waste for most jobs.