snapcraft
snapcraft copied to clipboard
Document and use the correct parallel build count envvars
What needs to get done
- fix the documentation
- create the following logic:
- Snapcraft should use
SNAPCRAFT_PARALLEL_BUILD_COUNT
. - If it is not set, use
CRAFT_PARALLEL_BUILD_COUNT
- If it is not set, take the lesser of
SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT
and the total number of CPUs on the system.- If
SNAPCRAFT_MAX_PARALLEL_BUILD_COUNT
is not set, then useCRAFT_MAX_PARALLEL_BUILD_COUNT
- If
- If neither
MAX
envvars are set and the number of CPUs on the system cannot be determined, default to 1.
Why it needs to get done
- Documentation is incomplete and unclear
-
CRAFT_PARALLEL_BUILD_COUNT
is not being read by any craft-parts -
SNAPCRAFT_PARALLEL_BUILD_COUNT
is not being read for core22 and onwards