snapcraft icon indicating copy to clipboard operation
snapcraft copied to clipboard

Document and use the correct parallel build count envvars

Open mr-cal opened this issue 1 year ago • 0 comments

What needs to get done

  • fix the documentation
  • create the following logic:
  1. Snapcraft should use SNAPCRAFT_PARALLEL_BUILD_COUNT.
  2. If it is not set, use CRAFT_PARALLEL_BUILD_COUNT
  3. 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 use CRAFT_MAX_PARALLEL_BUILD_COUNT
  4. 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

  1. Documentation is incomplete and unclear
  2. CRAFT_PARALLEL_BUILD_COUNT is not being read by any craft-parts
  3. SNAPCRAFT_PARALLEL_BUILD_COUNT is not being read for core22 and onwards

mr-cal avatar Jan 24 '24 15:01 mr-cal