Skip to content

GHA: adjust parallel job counts#12927

Closed
Ayesh wants to merge 1 commit intocurl:masterfrom
Ayesh:ci-make-parallel/ci
Closed

GHA: adjust parallel job counts#12927
Ayesh wants to merge 1 commit intocurl:masterfrom
Ayesh:ci-make-parallel/ci

Conversation

@Ayesh
Copy link
Contributor

@Ayesh Ayesh commented Feb 12, 2024

Adjusts the make -j flag to match the latest GitHub-hosted runner
hardware specs1:

  • ubuntu-latest on 4 CPU cores
  • macos-latest on 3 CPU cores

The processor count is ideally obtained from nproc, but setting env
vars from the current CI yaml files is not possible because they expect
literal strings.

Closes #12927

Footnotes

  1. https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

@github-actions github-actions bot added the CI Continuous Integration label Feb 12, 2024
@pheiduck
Copy link
Contributor

pheiduck commented Feb 12, 2024

Why not using $(nproc)+1?

@Ayesh
Copy link
Contributor Author

Ayesh commented Feb 12, 2024

The root level env keys cannot have variables expanded, so they have to be hardcoded or taken from the context. At least I couldn't figure it out.

We could setup the env var before calling make, but I wanted to keep the change set minimal.

@dfandrich
Copy link
Contributor

dfandrich commented Feb 12, 2024 via email

@Ayesh
Copy link
Contributor Author

Ayesh commented Feb 12, 2024

Thank you @dfandrich - I saw your commit that added parallel CI jobs and the discussions around it.

GitHub recently doubled the specs of their hosted runners, so this one tries to take advantage of it. I could run this locally with make -j16, and the PR seems to pass CI too, so perhaps the issues are now ironed out?

@bagder
Copy link
Member

bagder commented May 2, 2024

@dfandrich so do we close this as a duplicate of #11510 ?

@vszakats vszakats changed the title CI: Adjust GitHub Actions parallel job counts GHA: adjust GitHub Actions parallel job counts May 28, 2024
@vszakats vszakats changed the title GHA: adjust GitHub Actions parallel job counts GHA: adjust parallel job counts May 28, 2024
Adjusts the `make -j` flag to match the latest GitHub-hosted runner
hardware specs[^1]:

 - `ubuntu-latest` on 4 CPU cores
 - `macos-latest` on 3 CPU cores

The processor count is ideally obtained from `nproc`, but setting env
vars from the current CI yaml files is not possible because they expect
literal strings.

[^1]: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

Closes #12927
@vszakats
Copy link
Member

This is independent from the test parallelism. But bumping build parallelism as in this PR, did not seem to bring a conclusive improvement according to the few test runs seen today. Ref: #13807 and https://github.com/curl/curl-for-win/actions/runs/9265348474. Not sure why.

@dfandrich
Copy link
Contributor

Sorry, I missed responding to the comment but more importantly missed that this was adjusting build jobs and not test jobs. This change should be conceptually fine. I've found that GHA machines can be a bit overloaded sometimes, so I could see how increasing the number of build processes might not always reduce the build time, but it should probably be done anyway to take advantage of times of low load.

@vszakats
Copy link
Member

This change should be conceptually fine. I've found that GHA machines can be a bit overloaded sometimes, so I could see how increasing the number of build processes might not always reduce the build time, but it should probably be done anyway to take advantage of times of low load.

Agreed.

@vszakats vszakats closed this in e838b34 May 30, 2024
@vszakats
Copy link
Member

Thank you @Ayesh, merged now!

vszakats added a commit to vszakats/curl that referenced this pull request Jun 2, 2024
vszakats added a commit that referenced this pull request Jun 2, 2024
- bump rest of the workflows (windows, macos, distrocheck).

- non-native virtualized envs have 2 CPUs, bump down accordingly.
  (for `vmactions/omnios-vm` it's just a guess.)

- bump all to nproc + 1.

Follow-up to e838b34 #12927
Closes #13807
vszakats added a commit that referenced this pull request Jun 2, 2024
This toolchain resides in the `mingw32` directory. Make sure to
configure `PATH` accordingly.

Before this patch, it pointed to a non-existing `mingw64` directory,
making the job use the wrong compiler (gcc 12, 64-bit).

Follow-up to e838b34 #12927
Closes #13863
@Ayesh Ayesh deleted the ci-make-parallel/ci branch June 23, 2024 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration performance

Development

Successfully merging this pull request may close these issues.

5 participants