<p>No, <em>jobs</em> (which <code>rust-latest</code> and <code>rust-nightly</code> are examples of) will run in parallel if they are in the same <em>stage</em> (of which you only have one, <code>build</code>).</p>

CC BY-SA 4.0
2019-02-15T07:24:06.097Z
2019-02-15T07:24:06.097Z
l0b0
<p>Did I understand this correctly, that stages will run in parallel if they have the same name?</p>

<pre><code>stages:
  - build

rust-latest:
  stage: build
  image: rust:latest
  script:
    - apt-get update &amp;&amp; apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose -- --nocapture

rust-nightly:
  stage: build
  image: rustlang/rust:nightly
  script:
    - apt-get update &amp;&amp; apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose
  allow_failure: true
</code></pre>

<p>And that the stages should be the same if they are independent? Will this make deployments quicker compared to:</p>

<pre><code>stages:
  - build
  - build2

rust-latest:
  stage: build
  image: rust:latest
  script:
    - apt-get update &amp;&amp; apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose -- --nocapture

rust-nightly:
  stage: build2
  image: rustlang/rust:nightly
  script:
    - apt-get update &amp;&amp; apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose
  allow_failure: true
</code></pre>

<gitlab-ci-runner><learning>
Understand GitLab CI/CD better
Niklas Rosencrantz
# Understand GitLab CI/CD better

(Asked by: username_0 on 2019-02-15)

Did I understand this correctly, that stages will run in parallel if they have the same name?
stages:
  - build

rust-latest:
  stage: build
  image: rust:latest
  script:
    - apt-get update && apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose -- --nocapture

rust-nightly:
  stage: build
  image: rustlang/rust:nightly
  script:
    - apt-get update && apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose
  allow_failure: true

And that the stages should be the same if they are independent? Will this make deployments quicker compared to:
stages:
  - build
  - build2

rust-latest:
  stage: build
  image: rust:latest
  script:
    - apt-get update && apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose -- --nocapture

rust-nightly:
  stage: build2
  image: rustlang/rust:nightly
  script:
    - apt-get update && apt-get -y install libgccjit-6-dev
    - cargo build --verbose
    - cargo test --verbose
  allow_failure: true

**Tags:** gitlab-ci-runner, learning


---

## 1 answers

### Answer by username_1 on 2019-02-15. Score: 2 | Accepted answer

No, *jobs* (which `rust-latest` and `rust-nightly` are examples of) will run in parallel if they are in the same *stage* (of which you only have one, `build`).


---

