Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use parallel build in CI #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

wusatosi
Copy link
Member

The GitHub Actions runner has 4 cores, parallel build should speed up the build process.

Unfortunately, there's not a portable way to add this in preset, see: here.

@neatudarius
Copy link
Member

neatudarius commented Jan 16, 2025

What's the new duration? (old vs new)

Copy link
Member

@steve-downey steve-downey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The explicit command is fine here, but for completeness:

                   The CMAKE_BUILD_PARALLEL_LEVEL environment variable
                   specifies a default parallel level when this option
                   is not given.

for cases where the cmake command may be indirectly used.

@dietmarkuehl
Copy link
Contributor

Silly question on the CI: is there a way to run the CI (or parts thereof if things depened on the OS) locally?

@@ -117,7 +117,7 @@ jobs:
- name: Build Release
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do parallel jobs ? e.g. Build Release || Build Debug

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way to run these in parallel is to separate them into multiple jobs. This would bring speedup but it would make number of checks double.

@wusatosi
Copy link
Member Author

What's the new duration? (old vs new)

The speedup won't be observed here in exemplar. This is more for downstream libraries.

@wusatosi
Copy link
Member Author

Silly question on the CI: is there a way to run the CI (or parts thereof if things depened on the OS) locally?

Unfortunately GitHub Action is notoriously not testable, there's no officially supported execution engine, but Ack is a community maintained implementation that allows you to run the pipeline locally.

@steve-downey
Copy link
Member

steve-downey commented Jan 16, 2025

Silly question on the CI: is there a way to run the CI (or parts thereof if things depened on the OS) locally?

Not easily, unfortunately. I've had some success with https://github.com/nektos/act and when it works it works fine, but it's a bit tricky to get working. That's the same as the project that @wusatosi mentioned.

@wusatosi
Copy link
Member Author

Not easily, unfortunately. I've had some success with https://github.com/nektos/act and when it works it works fine, but it's a bit tricky to get working. That's the same as the project that @wusatosi mentioned.

Yeah I personally find creating a branch and putting up debugging commits to be, ironically, the easiest approach.

@dietmarkuehl
Copy link
Contributor

Thanks for the pointer to ACT: I'll have a look. My objevtive isn't to test the CI bit rather to test the code, assuming the CI works. I'll see how that goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants