CI: Use 'needs' to make dependencies more clear

GitLab CI has two execution scheduling models. The original model is to
split jobs into stages; jobs within a single stage may execute in
parallel, but execution is serialised between stages.

As we move to supporting multiple OSes and architectures, there is no
need to serialise, e.g. the AArch64 Linux build against the x86-64
FreeBSD container preparation.

Declare our dependencies explicitly using `needs`.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent d28aa36563
commit 2de949f723
  1. 23
      .gitlab-ci.yml

@ -180,6 +180,9 @@ x86_64-debian-container_prep:
- .debian-x86_64 - .debian-x86_64
- .fdo.suffixed-image@debian - .fdo.suffixed-image@debian
- .build-env - .build-env
needs:
- job: x86_64-debian-container_prep
artifacts: false
.test-env-debian-x86_64: .test-env-debian-x86_64:
tags: tags:
@ -187,9 +190,13 @@ x86_64-debian-container_prep:
extends: extends:
- .build-env-debian-x86_64 - .build-env-debian-x86_64
- .build-and-test - .build-and-test
needs:
- job: x86_64-debian-container_prep
artifacts: false
# Full build, used for testing under KVM. # Full build, used for testing under KVM.
x86_64-debian-full-build: x86_64-debian-full-build:
extends: .test-env-debian-x86_64
variables: variables:
MESON_OPTIONS: > MESON_OPTIONS: >
-Doptimization=0 -Doptimization=0
@ -197,7 +204,6 @@ x86_64-debian-full-build:
-Dwerror=true -Dwerror=true
-Dtest-skip-is-failure=true -Dtest-skip-is-failure=true
-Dlauncher-libseat=true -Dlauncher-libseat=true
extends: .test-env-debian-x86_64
after_script: after_script:
- ninja -C "$BUILDDIR" coverage-html > "$BUILDDIR/meson-logs/ninja-coverage-html.txt" - ninja -C "$BUILDDIR" coverage-html > "$BUILDDIR/meson-logs/ninja-coverage-html.txt"
- ninja -C "$BUILDDIR" coverage-xml - ninja -C "$BUILDDIR" coverage-xml
@ -219,6 +225,7 @@ docs-build:
# Building without gl-renderer, to make sure this keeps working. # Building without gl-renderer, to make sure this keeps working.
x86_64-debian-no-gl-build: x86_64-debian-no-gl-build:
extends: .test-env-debian-x86_64
variables: variables:
MESON_OPTIONS: > MESON_OPTIONS: >
-Dsimple-clients=damage,im,shm,touch,dmabuf-v4l -Dsimple-clients=damage,im,shm,touch,dmabuf-v4l
@ -227,7 +234,6 @@ x86_64-debian-no-gl-build:
-Dpipewire=false -Dpipewire=false
-Dwerror=true -Dwerror=true
-Dlauncher-libseat=true -Dlauncher-libseat=true
extends: .test-env-debian-x86_64
# Expose docs and coverage reports, so we can show users any changes to these # Expose docs and coverage reports, so we can show users any changes to these
# inside their merge requests, letting us check them before merge. # inside their merge requests, letting us check them before merge.
@ -242,6 +248,11 @@ docs-and-coverage:
- .debian-x86_64 - .debian-x86_64
- .fdo.suffixed-image@debian - .fdo.suffixed-image@debian
stage: pages stage: pages
needs:
- job: docs-build
artifacts: true
- job: x86_64-debian-full-build
artifacts: true
timeout: 5m timeout: 5m
script: script:
- mv prefix-weston-docs-build/share/doc/weston Documentation - mv prefix-weston-docs-build/share/doc/weston Documentation
@ -250,9 +261,6 @@ docs-and-coverage:
- cp doc/style/lcov-style.css Test_Coverage/gcov.css - cp doc/style/lcov-style.css Test_Coverage/gcov.css
- cp doc/style/*.png Test_Coverage/ - cp doc/style/*.png Test_Coverage/
- rm -rf build-* prefix-* - rm -rf build-* prefix-*
dependencies:
- docs-build
- x86_64-debian-full-build
artifacts: artifacts:
expose_as: 'Documentation preview and test coverage report' expose_as: 'Documentation preview and test coverage report'
paths: paths:
@ -270,8 +278,9 @@ pages:
- .fdo.suffixed-image@debian - .fdo.suffixed-image@debian
stage: pages stage: pages
timeout: 5m timeout: 5m
dependencies: needs:
- docs-build - job: docs-build
artifacts: true
script: script:
- export PREFIX=$(pwd)/prefix-weston-docs-build - export PREFIX=$(pwd)/prefix-weston-docs-build
- mkdir public - mkdir public

Loading…
Cancel
Save