ci: Build and test also on aarch64

This adds 64 bit ARM support to parts of the CI pipeline, more
specifically, we now:

  - Build a 64 bit ARM container image alongside the 64 bit x86 one.
  - Build test mutter on 64 bit ARM
  - Run tests on 64 bit ARM
  - Check coverage on 64 bit ARM

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1577>
This commit is contained in:
Jonas Ådahl 2020-11-19 14:48:28 +01:00
parent 3cf11f77b3
commit 5ddf416bc9

View File

@ -9,10 +9,10 @@ stages:
- test - test
- coverage - coverage
.mutter.fedora:33: .mutter.fedora:33@common:
variables: variables:
FDO_DISTRIBUTION_VERSION: 33 FDO_DISTRIBUTION_VERSION: 33
FDO_DISTRIBUTION_TAG: '2020-11-20.1' BASE_TAG: '2020-11-23.0'
FDO_UPSTREAM_REPO: GNOME/mutter FDO_UPSTREAM_REPO: GNOME/mutter
FDO_DISTRIBUTION_EXEC: | FDO_DISTRIBUTION_EXEC: |
dnf install -y 'dnf-command(builddep)' && dnf install -y 'dnf-command(builddep)' &&
@ -52,6 +52,18 @@ default:
- 'scheduler_failure' - 'scheduler_failure'
- 'api_failure' - 'api_failure'
.mutter.fedora:33@x86_64:
extends: .mutter.fedora:33@common
variables:
FDO_DISTRIBUTION_TAG: "x86_64-${BASE_TAG}"
.mutter.fedora:33@aarch64:
extends: .mutter.fedora:33@common
variables:
FDO_DISTRIBUTION_TAG: "aarch64-${BASE_TAG}"
tags:
- aarch64
workflow: workflow:
rules: rules:
- if: '$CI_MERGE_REQUEST_IID' - if: '$CI_MERGE_REQUEST_IID'
@ -101,22 +113,28 @@ check-merge-request:
junit: check-merge-request-report.xml junit: check-merge-request-report.xml
<<: *pipline-guard <<: *pipline-guard
build-fedora-container: build-fedora-container@x86_64:
extends: extends:
- .fdo.container-build@fedora@x86_64 - .fdo.container-build@fedora@x86_64
- .mutter.fedora:33 - .mutter.fedora:33@x86_64
stage: prepare stage: prepare
needs: needs:
- check-commit-log - check-commit-log
- check-merge-request - check-merge-request
build-mutter: build-fedora-container@aarch64:
extends:
- .fdo.container-build@fedora@aarch64
- .mutter.fedora:33@aarch64
stage: prepare
needs:
- check-commit-log
- check-merge-request
.build-mutter:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33
stage: build stage: build
needs:
- build-fedora-container
script: script:
- meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr - meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build - ninja -C build
@ -126,13 +144,27 @@ build-mutter:
paths: paths:
- build - build
build-without-opengl-and-glx: build-mutter@x86_64:
extends:
- .build-mutter
- .mutter.fedora:33@x86_64
needs:
- build-fedora-container@x86_64
build-mutter@aarch64:
extends:
- .build-mutter
- .mutter.fedora:33@aarch64
needs:
- build-fedora-container@aarch64
build-without-opengl-and-glx@x86_64:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33 - .mutter.fedora:33@x86_64
stage: build stage: build
needs: needs:
- build-fedora-container - build-fedora-container@x86_64
script: script:
- meson . build -Dbuildtype=debugoptimized -Dopengl=false -Dglx=false -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr - meson . build -Dbuildtype=debugoptimized -Dopengl=false -Dglx=false -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build - ninja -C build
@ -141,13 +173,13 @@ build-without-opengl-and-glx:
paths: paths:
- build/meson-logs - build/meson-logs
build-without-native-backend-and-wayland: build-without-native-backend-and-wayland@x86_64:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33 - .mutter.fedora:33@x86_64
stage: build stage: build
needs: needs:
- build-fedora-container - build-fedora-container@x86_64
script: script:
- meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr - meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr
- ninja -C build - ninja -C build
@ -156,15 +188,10 @@ build-without-native-backend-and-wayland:
paths: paths:
- build/meson-logs - build/meson-logs
test-mutter: .test-mutter:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33
stage: test stage: test
dependencies:
- build-mutter
needs:
- build-mutter
variables: variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir" XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data" GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
@ -182,15 +209,28 @@ test-mutter:
paths: paths:
- build - build
test-mutter-coverage: test-mutter@x86_64:
extends:
- .test-mutter
- .mutter.fedora:33@x86_64
needs:
- build-mutter@x86_64
dependencies:
- build-mutter@x86_64
test-mutter@aarch64:
extends:
- .test-mutter
- .mutter.fedora:33@aarch64
needs:
- build-mutter@aarch64
dependencies:
- build-mutter@aarch64
.test-mutter-coverage:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33
stage: coverage stage: coverage
dependencies:
- test-mutter
needs:
- test-mutter
script: script:
- ninja -C build coverage - ninja -C build coverage
- cat build/meson-logs/coverage.txt - cat build/meson-logs/coverage.txt
@ -199,15 +239,33 @@ test-mutter-coverage:
- build/meson-logs/coveragereport - build/meson-logs/coveragereport
coverage: '/^TOTAL.*\s+(\d+\%)$/' coverage: '/^TOTAL.*\s+(\d+\%)$/'
can-build-gnome-shell: test-mutter-coverage@x86_64:
extends:
- .test-mutter-coverage
- .mutter.fedora:33@x86_64
needs:
- test-mutter@x86_64
dependencies:
- test-mutter@x86_64
test-mutter-coverage@aarch64:
extends:
- .test-mutter-coverage
- .mutter.fedora:33@aarch64
needs:
- test-mutter@aarch64
dependencies:
- test-mutter@aarch64
can-build-gnome-shell@x86_64:
extends: extends:
- .fdo.distribution-image@fedora - .fdo.distribution-image@fedora
- .mutter.fedora:33 - .mutter.fedora:33@x86_64
stage: test stage: test
dependencies: dependencies:
- build-mutter - build-mutter@x86_64
needs: needs:
- build-mutter - build-mutter@x86_64
before_script: before_script:
- meson install --no-rebuild -C build - meson install --no-rebuild -C build
script: script: