CI: Start parameterising for OS/architecture

No functional change to the test runs, apart from changing the job
names. This will allow us to test along more axes without more
duplication.

Signed-off-by: Daniel Stone <daniels@collabora.com>
dev
Daniel Stone 3 years ago
parent c2642eb21a
commit 770746e089
  1. 72
      .gitlab-ci.yml

@ -42,6 +42,8 @@
variables: variables:
FDO_UPSTREAM_REPO: wayland/weston FDO_UPSTREAM_REPO: wayland/weston
FDO_REPO_SUFFIX: "$BUILD_OS/$BUILD_ARCH"
FDO_DISTRIBUTION_TAG: '2021-07-31.1-wayland-protocols'
include: include:
@ -67,17 +69,17 @@ stages:
# Base variables used for anything using a Debian environment # Base variables used for anything using a Debian environment
.debian: .os-debian:
variables: variables:
BUILD_OS: debian
FDO_DISTRIBUTION_VERSION: buster FDO_DISTRIBUTION_VERSION: buster
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
FDO_DISTRIBUTION_TAG: '2021-07-31.1-wayland-protocols'
.ci-rules: .ci-rules:
rules: rules:
- when: on_success - when: on_success
# does not inherit .ci-rules # Does not inherit .ci-rules as we only want it to run in MR context.
check-commit: check-commit:
extends: extends:
- .fdo.ci-fairy - .fdo.ci-fairy
@ -94,14 +96,19 @@ check-commit:
reports: reports:
junit: results.xml junit: results.xml
.debian-x86_64:
extends:
- .os-debian
variables:
BUILD_ARCH: "x86-64"
# Build our base container image, which contains the core distribution, the # Build our base container image, which contains the core distribution, the
# toolchain, and all our build dependencies. This will be reused in the build # toolchain, and all our build dependencies. This will be reused in the build
# stage. # stage.
container_prep: x86_64-debian-container_prep:
extends: extends:
- .ci-rules - .ci-rules
- .debian - .debian-x86_64
- .fdo.container-build@debian - .fdo.container-build@debian
timeout: 30m timeout: 30m
stage: container_prep stage: container_prep
@ -110,10 +117,6 @@ container_prep:
# Core templates for all of our build steps. These are reused by all build jobs # Core templates for all of our build steps. These are reused by all build jobs
# through the `extends` keyword. # through the `extends` keyword.
.build-env: .build-env:
extends:
- .ci-rules
- .debian
- .fdo.distribution-image@debian
timeout: 5m timeout: 5m
stage: build stage: build
variables: variables:
@ -129,9 +132,8 @@ container_prep:
# run this inside a virtme (qemu wrapper) VM environment so we can test the DRM # run this inside a virtme (qemu wrapper) VM environment so we can test the DRM
# backend using the 'vkms' virtual driver under Linux. # backend using the 'vkms' virtual driver under Linux.
.build-and-test: .build-and-test:
extends: .build-env extends:
tags: - .ci-rules
- kvm
script: script:
- cd "$BUILDDIR" - cd "$BUILDDIR"
- meson --prefix="$PREFIX" -Db_sanitize=address ${MESON_OPTIONS} .. - meson --prefix="$PREFIX" -Db_sanitize=address ${MESON_OPTIONS} ..
@ -156,7 +158,9 @@ container_prep:
# Same as above, but without running any tests. # Same as above, but without running any tests.
.build-no-test: .build-no-test:
extends: .build-env extends:
- .ci-rules
- .build-env
script: script:
- cd "$BUILDDIR" - cd "$BUILDDIR"
- meson --prefix="$PREFIX" ${MESON_OPTIONS} .. - meson --prefix="$PREFIX" ${MESON_OPTIONS} ..
@ -170,7 +174,22 @@ container_prep:
- $BUILDDIR/meson-logs - $BUILDDIR/meson-logs
- $PREFIX - $PREFIX
full-build: # OS/architecture-specific variants
.build-env-debian-x86_64:
extends:
- .debian-x86_64
- .fdo.suffixed-image@debian
- .build-env
.test-env-debian-x86_64:
tags:
- kvm
extends:
- .build-env-debian-x86_64
- .build-and-test
# Full build, used for testing under KVM.
x86_64-debian-full-build:
variables: variables:
MESON_OPTIONS: > MESON_OPTIONS: >
-Doptimization=0 -Doptimization=0
@ -178,7 +197,7 @@ full-build:
-Dwerror=true -Dwerror=true
-Dtest-skip-is-failure=true -Dtest-skip-is-failure=true
-Dlauncher-libseat=true -Dlauncher-libseat=true
extends: .build-and-test 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
@ -187,14 +206,19 @@ full-build:
reports: reports:
cobertura: $BUILDDIR/meson-logs/coverage.xml cobertura: $BUILDDIR/meson-logs/coverage.xml
# Docs should be invariant on all architectures, so we only do it on Debian
# x86-64.
docs-build: docs-build:
variables: variables:
MESON_OPTIONS: > MESON_OPTIONS: >
-Dwerror=true -Dwerror=true
-Ddoc=true -Ddoc=true
extends: .build-no-test extends:
- .build-env-debian-x86_64
- .build-no-test
no-gl-build: # Building without gl-renderer, to make sure this keeps working.
x86_64-debian-no-gl-build:
variables: variables:
MESON_OPTIONS: > MESON_OPTIONS: >
-Dsimple-clients=damage,im,shm,touch,dmabuf-v4l -Dsimple-clients=damage,im,shm,touch,dmabuf-v4l
@ -203,7 +227,7 @@ no-gl-build:
-Dpipewire=false -Dpipewire=false
-Dwerror=true -Dwerror=true
-Dlauncher-libseat=true -Dlauncher-libseat=true
extends: .build-and-test 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.
@ -215,20 +239,20 @@ no-gl-build:
docs-and-coverage: docs-and-coverage:
extends: extends:
- .ci-rules - .ci-rules
- .debian - .debian-x86_64
- .fdo.distribution-image@debian - .fdo.suffixed-image@debian
stage: pages stage: pages
timeout: 5m timeout: 5m
script: script:
- mv prefix-weston-docs-build/share/doc/weston Documentation - mv prefix-weston-docs-build/share/doc/weston Documentation
- mv build-weston-full-build/meson-logs/coveragereport Test_Coverage - mv build-weston-x86_64-debian-full-build/meson-logs/coveragereport Test_Coverage
- rm Test_Coverage/gcov.css - rm Test_Coverage/gcov.css
- 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: dependencies:
- docs-build - docs-build
- full-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:
@ -242,8 +266,8 @@ docs-and-coverage:
# the upstream repo. # the upstream repo.
pages: pages:
extends: extends:
- .debian - .debian-x86_64
- .fdo.distribution-image@debian - .fdo.suffixed-image@debian
stage: pages stage: pages
timeout: 5m timeout: 5m
dependencies: dependencies:

Loading…
Cancel
Save