How to change CI/CD diagram look/functionality

Hello ,
i did write a .yml code and everything is working fine but it looks like this in the pipeline diagram:
image

is there anyway that i can change my code so it looks like this:
image

so whatever build part finishes first, it does move to the next part which is testing(currenty the first part build need to be finish in both then both of the tests parts start at the same time)

my code:

Thanks for taking the time to be thorough my request, it really helps! :blush:

Hi there!

It looks like you need to tell the YAML file that the Windows build only depends on Windows test and the Linux build only depends on the Linux test. Here’s a job from one of my files that has some complex dependencies:

lint:cpp:clang-tidy:
    ...
    script:
        - ...

lint:cpp:clang-format:
    ...
    script:
        - ...

build:cpp:
    stage: build:cpp
    dependencies:
        - lint:cpp:clang-format
        - lint:cpp:clang-tidy

If you look through the documentation for CI configs you’ll find that the dependencies and needs keywords are related, and probably both worth a look.

Good luck!

Sarah

1 Like

the Windows build only depends on Windows test

Vice versa, surely? Otherwise, dependencies are really going to mess with my mind…

Alternatively, it will depend on exactly what a “Windows build” or “Linux build” is. If you’re cross-compiling in one gitlab runner, it will need Sarah’s solution. If you build Windows on Windows and Linux on Linux, as I do, then you can use tags to specify which gitlab runner will execute which steps

1 Like

Ha! Yes, vice-versa exactly.

1 Like

+1 for using needs
It gives you the benefits of directed acyclic graph, which speeds up your pipeline runs.

1 Like

first of all, thank you so much for trying to help me but i changed the yml like this :


but its the same :
image
and the test:linux says:
image

it works with the needs :smiley:
code :


graph is sadly the same but now doesnt w8 for both to finish :
image

Thank you so much for the help again