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

Run tests in parallel inside GitHub actions #20

Open
rodsan0 opened this issue Oct 12, 2021 · 0 comments
Open

Run tests in parallel inside GitHub actions #20

rodsan0 opened this issue Oct 12, 2021 · 0 comments

Comments

@rodsan0
Copy link
Collaborator

rodsan0 commented Oct 12, 2021

Makefile (more specifically make) has an argument that can be passed to run targets in parallel instead of sequentially. It achieves this by running the targets in batches. This means the behavior is similar to running them normally--if any of the tests in a batch fails, the batch stops gracefully and tests do not continue to be executed.

Ideally, the number of targets run in each batch is equal to the number of processes available in the CPU (can be obtained with nproc). As such, I think it would be a good idea that the multiple cd tests && make in .github/CI.yml be changed to cd tests && make -j$(nproc).

This is a good stop-gap change until CMake/CTest is used for testing in the future, as it would theoretically speed up GitHub actions by 100% (GH Actions has two processes available).

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

No branches or pull requests

1 participant