2019-02-26 18:51:09 +01:00
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- deploy
|
|
|
|
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- _ccache/
|
|
|
|
|
2020-07-21 12:51:29 +02:00
|
|
|
variables:
|
|
|
|
DEBIAN_IMAGE: "registry.freedesktop.org/pwithnall/malcontent/debian-unstable:v1"
|
|
|
|
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
|
|
|
G_MESSAGES_DEBUG: all
|
|
|
|
MESON_COMMON_OPTIONS: "--buildtype debug --wrap-mode=nodownload"
|
|
|
|
|
|
|
|
.only-default:
|
|
|
|
only:
|
|
|
|
- branches
|
2019-02-26 18:51:09 +01:00
|
|
|
except:
|
|
|
|
- tags
|
2020-07-21 12:51:29 +02:00
|
|
|
|
|
|
|
.build:
|
|
|
|
extends: .only-default
|
|
|
|
before_script:
|
|
|
|
- cp -r $HOME/subprojects/* subprojects/
|
|
|
|
|
|
|
|
debian:
|
|
|
|
extends: .build
|
|
|
|
image: $DEBIAN_IMAGE
|
|
|
|
stage: build
|
|
|
|
variables:
|
|
|
|
CFLAGS: "-coverage -ftest-coverage -fprofile-arcs"
|
2019-02-26 18:51:09 +01:00
|
|
|
script:
|
2020-07-21 12:51:29 +02:00
|
|
|
- meson ${MESON_COMMON_OPTIONS}
|
|
|
|
--werror
|
|
|
|
-Db_coverage=true
|
|
|
|
-Dinstalled_tests=true
|
|
|
|
-Dprivileged_group=sudo
|
|
|
|
_build
|
|
|
|
- ninja -C _build
|
|
|
|
- mkdir -p _coverage
|
|
|
|
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --initial --output-file "_coverage/${CI_JOB_NAME}-baseline.lcov"
|
|
|
|
- .gitlab-ci/run-tests.sh
|
|
|
|
- lcov --config-file .gitlab-ci/lcovrc --directory _build --capture --output-file "_coverage/${CI_JOB_NAME}.lcov"
|
|
|
|
- bash -x ./.gitlab-ci/coverage-docker.sh
|
2019-02-26 18:51:09 +01:00
|
|
|
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
|
|
|
|
artifacts:
|
2020-07-21 12:51:29 +02:00
|
|
|
reports:
|
|
|
|
junit: "_build/${CI_JOB_NAME}-report.xml"
|
2019-02-26 18:51:09 +01:00
|
|
|
name: "malcontent-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
|
2020-07-21 12:51:29 +02:00
|
|
|
when: always
|
2019-02-26 18:51:09 +01:00
|
|
|
paths:
|
2020-07-21 12:51:29 +02:00
|
|
|
- "_build/config.h"
|
2019-02-26 18:51:09 +01:00
|
|
|
- "_build/meson-logs"
|
2020-07-21 12:51:29 +02:00
|
|
|
- "_build/${CI_JOB_NAME}-report.xml"
|
|
|
|
- "_coverage"
|
2019-02-26 18:51:09 +01:00
|
|
|
|
|
|
|
# FIXME: Run gtkdoc-check when we can. See:
|
|
|
|
# https://github.com/mesonbuild/meson/issues/3580
|
|
|
|
|
|
|
|
pages:
|
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
script:
|
2020-07-21 12:51:29 +02:00
|
|
|
- mv _coverage/ public/
|
2019-02-26 18:51:09 +01:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|