-
Is it possible to run given steps in parallel? For example, we have a number of dependencies to build before we can build our component, and then test our component. It would be nice if the dependency build steps could first run in parallel, followed by our component build step, and the test step. |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 10 replies
-
Not at this moment. Only jobs can run in parallel, but steps always run sequentially. I don’t know if there are any plans to ever support this. |
Beta Was this translation helpful? Give feedback.
-
Hi, is this still the case that the steps within the job cannot run in parallel. If that is the case, I wonder if there is any related documentation on best structuring the jobs to achieve the same goal (basically, turn the tasks into jobs) |
Beta Was this translation helpful? Give feedback.
-
If your steps are shell commands can you run them as a background task using the ‘&’ at the end of the command line. You won’t be told when they finish. I also don’t know if the workflow run will know to wait for the job to finish before it kills the instance. If you REALLY need parallelism, remember that an action allows you to write code. That code could trigger tasks in multiple threads. Seems like a lot of work, but the ability should be there. |
Beta Was this translation helpful? Give feedback.
-
As @amezick mentioned it is indeed possible via background tasks. And you can wait for them! At our CI, we do something like this:
|
Beta Was this translation helpful? Give feedback.
-
Or you can use GNU Parallel! |
Beta Was this translation helpful? Give feedback.
-
I am looking forward seeing steps to be runnable in parallel. so that the setup steps can run once (installing dependencies, setting up database etc) but then everything else can be run in parallel |
Beta Was this translation helpful? Give feedback.
-
I just create a multitask rake task:
|
Beta Was this translation helpful? Give feedback.
-
can show the detail of it, thanks |
Beta Was this translation helpful? Give feedback.
-
yes to parallel steps! even as simple as true/false parallel steps would be huge time saving!
|
Beta Was this translation helpful? Give feedback.
-
Please vote for supporting parallel steps here: #14484 |
Beta Was this translation helpful? Give feedback.
Not at this moment. Only jobs can run in parallel, but steps always run sequentially.
I don’t know if there are any plans to ever support this.