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

Does it allow to run things in paralell? #1

Open
fjtrujy opened this issue Jun 5, 2024 · 2 comments
Open

Does it allow to run things in paralell? #1

fjtrujy opened this issue Jun 5, 2024 · 2 comments

Comments

@fjtrujy
Copy link

fjtrujy commented Jun 5, 2024

Let me explain properly, imagine we have the next matrix

jobs:
  my_matrix_job:
    strategy:
      matrix:
        include:
          - id: libogg
            name: "libogg"
          - id: theora
            name: "theora"
          - id: tremor
            name: "tremor"

These 3 things, are libraries libogg, theora and tremor the interesting thing here, is that theora and tremor they both require libogg to be finished first.
So the wished scenario should be something as:

  1. Execute libogg job
  2. Execute in parallel theora and tremor jobs.

Is your action allowing such kinds of things?

Cheers

@rakles
Copy link
Owner

rakles commented Jun 5, 2024

Hi,

Unfortunately, it is not possible to do that, as the action was designed to run matrix jobs sequential in a specific order.

But it would be possible with a second job and the "needs" statement.

As an example:

jobs:
  buildLibogg:
    # Steps to build your libogg library here

  matrix_job:
    needs: [buildLibogg]
    strategy:
      matrix:
        include:
          - id: theora
            name: "theora"
          - id: tremor
            name: "tremor"
    # Steps to build your libraries that depend on libogg here

In this configuration, the "matrix_job" will wait until "buildLibogg" has finished building. Once buildLibogg completes, the matrix jobs for "theora" and "tremor" will run in parallel.

I hope this helps! If you have any further questions or need additional assistance, please feel free to ask.

@fjtrujy
Copy link
Author

fjtrujy commented Jun 5, 2024

That solution is not valid for me at it must be dynamic, I can’t really know the whole dependency tree, as it is huge and several levels of dependencies…
Thanks

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

2 participants