mutter/.gitlab-ci.yml
Jonas Ådahl 815ed52ca1 ci: Wait for review stage before continuing
If review fails, it'll fail very early in the pipeline, but we won't see
the test case failure until the whole pipeline succeeds, which might be
10 minutes later.

To avoid sitting there wondering why it failed, let the time consuming
jobs wait until the review stage, which tends to take less than 20
seconds, succeeds. This way the review test result will be presented
earlier.

This changes the pipeline to run the check-commit-log job also for
non-merge requests, with the difference being that it will pass
immediately if it's not a merge request.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1549>
2020-11-16 14:13:07 +01:00

103 lines
2.4 KiB
YAML

image: registry.gitlab.gnome.org/gnome/mutter/master:v4
stages:
- review
- build
- test
- coverage
check-commit-log:
stage: review
variables:
GIT_DEPTH: "100"
script:
- ./.gitlab-ci/check-commit-log.sh
artifacts:
expire_in: 1 week
paths:
- commit-message-junit-report.xml
reports:
junit: commit-message-junit-report.xml
build-mutter:
stage: build
needs: ["check-commit-log"]
script:
- meson . build -Dbuildtype=debugoptimized -Db_coverage=true -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
expire_in: 1 day
paths:
- build
build-without-opengl-and-glx:
stage: build
needs: ["check-commit-log"]
script:
- meson . build -Dbuildtype=debugoptimized -Dopengl=false -Dglx=false -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
paths:
- build/meson-logs
build-without-native-backend-and-wayland:
stage: build
needs: ["check-commit-log"]
script:
- meson . build -Dbuildtype=debugoptimized -Dnative_backend=false -Dudev=false -Dwayland=false -Dcore_tests=false --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
paths:
- build/meson-logs
test-mutter:
stage: test
dependencies:
- build-mutter
needs: ["build-mutter"]
variables:
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
GSETTINGS_SCHEMA_DIR: "$CI_PROJECT_DIR/build/data"
G_SLICE: "always-malloc"
MALLOC_CHECK_: "3"
NO_AT_BRIDGE: "1"
script:
- bash -x ./.gitlab-ci/run-tests.sh
artifacts:
expire_in: 1 day
reports:
junit: "build/${CI_JOB_NAME}-report.xml"
name: "mutter-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: always
paths:
- build
test-mutter-coverage:
stage: coverage
dependencies:
- test-mutter
needs: ["test-mutter"]
script:
- ninja -C build coverage
- cat build/meson-logs/coverage.txt
artifacts:
paths:
- build/meson-logs/coveragereport
coverage: '/^TOTAL.*\s+(\d+\%)$/'
when: always
can-build-gnome-shell:
stage: test
dependencies:
- build-mutter
needs: ["build-mutter"]
before_script:
- meson install --no-rebuild -C build
script:
- .gitlab-ci/checkout-gnome-shell.sh
- meson gnome-shell gnome-shell/build --prefix /usr -Dman=false
- ninja -C gnome-shell/build install