Re: [PATCH v3 5/8] ci: unify setup of some environment variables
- From
- Dragan Simic <dsimic@manjaro.org>
- Date
- Oct 30, 2023, 18:22 UTC
- Message-ID
- <1365af33315c501db15778bc1ecf3852@manjaro.org>
- In-Reply-To
- <87430c6c-91c0-4be1-b89d-bf442b3f018b@gmail.com>
On 2023-10-30 16:09, Phillip Wood wrote:
Show 23 quoted lines
> On 30/10/2023 12:15, Patrick Steinhardt wrote: >> Both GitHub Actions and Azue Pipelines set up the environment >> variables >> GIT_TEST_OPTS, GIT_PROVE_OPTS and MAKEFLAGS. And while most values are >> actually the same, the setup is completely duplicate. With the >> upcoming >> support for GitLab CI this duplication would only extend even further. >> >> Unify the setup of those environment variables so that only the >> uncommon >> parts are separated. While at it, we also perform some additional >> small >> improvements: >> >> - We use nproc instead of a hardcoded count of jobs for make and >> prove. This ensures that the number of concurrent processes >> adapts >> to the host automatically. > > Sadly this makes the Windows and MacOS jobs fail on GitHub Actions as > nproc is not installed[1]. Perhaps we could do > > --jobs="$(nproc || echo 2)"
It would be better to use the following, to also suppress any error messages:
--jobs=$(nproc 2> /dev/null || echo 2)
Having the quotation marks is also pretty much redundant.
> instead. (Maybe 2 is a bit low but the current value of 10 seems > pretty high for the number of cores on the runners that we use)