Parallel Steps #14484
Replies: 24 comments 38 replies
-
I'd like that too. There are scenarios where it doesn't make sense juggling artifacts between jobs. An idea how it could be used: steps:
- uses: actions/checkout@v3
- run: echo "Sequential step"
- parallel:
branch_id_1:
steps:
- run: echo "branch 1 sequential step 1"
- run: echo "branch 1 sequential step 2"
# Executes steps in parallel to branch1
branch_id_2:
steps:
- run: echo "branch 2 sequential step 1"
- run: echo "branch 2 sequential step 2"
- run: echo "More sequential steps after the whole parallel part is done." |
Beta Was this translation helpful? Give feedback.
-
Alternative solution: |
Beta Was this translation helpful? Give feedback.
-
Alternative solution: |
Beta Was this translation helpful? Give feedback.
-
Logging into docker in parallel is probably going to result in things exploding. Each docker login command tries to mutate Today, you could probably do something like: (To make these work, you'd want to have them rely on env vars and set the env vars using your workflow based on secrets)
HOME=$HOME/.docker-docker
mkdir -p $HOME
docker login ...
HOME=$HOME/.docker-gcr
mkdir -p $HOME
docker login ...
HOME=$HOME/.docker-ghcr
mkdir -p $HOME
docker login ...
for task in ./log-into-*.sh; do
$task &
done
wait
jq '. * input' ~/.docker*/config.js > my.config.js && mv my.config.js ~/.docker/config.js
jq '. * input' ~/.docker*/plaintext-credentials.config.json > my.plaintext.js && mv my.plaintext.js ~/.docker/plaintext-credentials.config.json |
Beta Was this translation helpful? Give feedback.
-
can we have the parallel steps please |
Beta Was this translation helpful? Give feedback.
-
The BitBucket has parallel step options. Why not add this option to GitHub actions? |
Beta Was this translation helpful? Give feedback.
-
This is the biggest pain point we've run into coming from Jenkins. You can approximate this feature with |
Beta Was this translation helpful? Give feedback.
-
Need parallel steps support for our scenario: deploy multi clusters concurrently within the same VPN environment. So it is convinient to achive in steps rather than actions or jobs |
Beta Was this translation helpful? Give feedback.
-
Using a yarn monorepo I'd like to:
yarn install is slow, and I currently have to repeat it for every workflow like |
Beta Was this translation helpful? Give feedback.
-
If its easier, GitHub could also allow sharing jobs workdirs |
Beta Was this translation helpful? Give feedback.
-
I just want to start a resource in a background, which needs some time to start, eg a docker container or a simulator. This resource should start during the job start. My test step should wait until the test resource is available, or fail after an (optional) timeout. - jobs:
- build
- resources:
- test-db
run: docker start someSlowImage
- steps:
- run: assemble
- run: test
resources:
- test-db
timeout: 5min |
Beta Was this translation helpful? Give feedback.
-
Just add
|
Beta Was this translation helpful? Give feedback.
-
As a workaround I was able to use this ` name: Distributed Tasks
This way I was able to run our tests parallel |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Hi. Are there any updates on this topic from a Github team member ? |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Would be great to have some updates here. Parallel steps would be great, plenty of instances where for example I'd like to know whether multiple steps fail (eg: a lint check as well as unit tests). While jobs can run in parallel, each needs to be setup again. Would be great for a pipeline to be able to run a setup step that for example pulls dependencies and then splits off in parallel steps each starting from the state left by the setup. |
Beta Was this translation helpful? Give feedback.
-
Would be awesome if we can, for example, compile our js/css files at the same time we are running composer (for PHP projects). |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add, that parallel jobs means waiting for multiple available workers, which can add a lot to the total build time, and in some cases you don't need the extra hardware. Not sure what's the problem with implementing this. It just adds an option that aparently a lot of people find useful. |
Beta Was this translation helpful? Give feedback.
-
Bitbucket can do it, just saying... |
Beta Was this translation helpful? Give feedback.
-
the current way of running steps in parallel (i.e using bash |
Beta Was this translation helpful? Give feedback.
-
Don't know much about Actions as I'm new to this (trying to find alternatives to Drone CI), but a simple feature like this took so long time to implement, maybe the design of Actions has some fundamental flaws on create DAG of steps. Drone steps are by default parallel, unless you add a 'depends_on' list to steps, which would transform them to a DAG. |
Beta Was this translation helpful? Give feedback.
-
Would love this feature as well. We already have quite long running pipelines and saving some time would be great. We build our .NET backend then pack it as docker image. While creating the image takes significant time we also need to upload our symbols to Sentry for better error analysis. While docker images are being created we could parallelize the upload to Sentry. A new job is no option as we lose the symbol files we require. Right now we run a separate job which fetches git, compiles, etc. all just to upload already built symbols. Please implement this! :) |
Beta Was this translation helpful? Give feedback.
-
I have 5 small steps (10-30sec), each runs a docker container with different arguments. Ideally I would have first step to build docker image and then run those five steps in parallel. Doing this with workflows seems cumbersome and would possibly prolong the total run time with artifact upload and artifact downloads added to share the image between jobs. |
Beta Was this translation helpful? Give feedback.
-
Hi,
Can you please raise a request to engineering for parallel steps support?
Eg. for logging in to multiple docker registries in parallel, or other actions which cannot be done in separate jobs because you require the local cache / side effects.
Uploading/downloading artifacts from adjacent jobs is not suitable for this use case.
Thanks
Hari
Beta Was this translation helpful? Give feedback.
All reactions