Answers: <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>
  
Answers: CC BY-SA 4.0
Answers: 2019-02-15T07:24:06.097Z
Answers: 2019-02-15T07:24:06.097Z
Answers: l0b0
Body: <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>
  
Tags: <gitlab-ci-runner><learning>
Title: Understand GitLab CI/CD better
UserDisplayName: Niklas Rosencrantz
ThreadText: # 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`).
  
  
  ---
  
  