2019-03-18 17:51:07 +03:00
|
|
|
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
|
|
|
|
|
|
|
|
variables:
|
2020-05-08 00:33:57 +03:00
|
|
|
FDO_UPSTREAM_REPO: wayland/weston
|
2019-03-18 17:51:07 +03:00
|
|
|
|
|
|
|
|
|
|
|
include:
|
2020-05-08 00:25:48 +03:00
|
|
|
- project: 'freedesktop/ci-templates'
|
2020-05-08 00:33:57 +03:00
|
|
|
ref: 59de540b620c45739871d1a073d76d5521989d11
|
2019-03-18 17:51:07 +03:00
|
|
|
file: '/templates/debian.yml'
|
|
|
|
|
2018-06-06 00:20:40 +03:00
|
|
|
|
|
|
|
stages:
|
2019-03-18 17:51:07 +03:00
|
|
|
- container_prep
|
2018-06-06 00:20:40 +03:00
|
|
|
- build
|
2019-06-14 16:00:07 +03:00
|
|
|
- pages
|
2018-06-06 00:20:40 +03:00
|
|
|
|
|
|
|
|
2020-05-08 00:33:57 +03:00
|
|
|
.debian:
|
|
|
|
variables:
|
|
|
|
FDO_DISTRIBUTION_VERSION: buster
|
|
|
|
FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh'
|
2019-11-21 16:06:30 +03:00
|
|
|
FDO_DISTRIBUTION_TAG: '2021-03-04.1'
|
2020-05-08 00:33:57 +03:00
|
|
|
|
|
|
|
|
2019-03-18 17:51:07 +03:00
|
|
|
container_prep:
|
2020-05-08 00:33:57 +03:00
|
|
|
extends:
|
|
|
|
- .debian
|
|
|
|
- .fdo.container-build@debian
|
2019-03-18 17:51:07 +03:00
|
|
|
stage: container_prep
|
|
|
|
|
|
|
|
|
|
|
|
.build-native:
|
2020-05-08 00:33:57 +03:00
|
|
|
extends:
|
|
|
|
- .debian
|
|
|
|
- .fdo.distribution-image@debian
|
2018-06-06 00:20:40 +03:00
|
|
|
stage: build
|
2019-03-18 17:51:07 +03:00
|
|
|
before_script:
|
2019-05-09 12:56:04 +03:00
|
|
|
- git clone --depth=1 https://gitlab.freedesktop.org/wayland/wayland-protocols
|
2018-06-06 00:20:40 +03:00
|
|
|
- export WAYLAND_PROTOCOLS_DIR="$(pwd)/prefix-wayland-protocols"
|
|
|
|
- export PKG_CONFIG_PATH="$WAYLAND_PROTOCOLS_DIR/share/pkgconfig:$PKG_CONFIG_PATH"
|
|
|
|
- export MAKEFLAGS="-j4"
|
|
|
|
- cd wayland-protocols
|
|
|
|
- git show -s HEAD
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- ../autogen.sh --prefix="$WAYLAND_PROTOCOLS_DIR"
|
|
|
|
- make install
|
|
|
|
- cd ../../
|
|
|
|
- export XDG_RUNTIME_DIR="$(mktemp -p $(pwd) -d xdg-runtime-XXXXXX)"
|
2019-06-14 16:00:07 +03:00
|
|
|
- export BUILD_ID="weston-$CI_JOB_NAME"
|
2018-06-06 00:20:40 +03:00
|
|
|
- export PREFIX="$(pwd)/prefix-$BUILD_ID"
|
|
|
|
- export BUILDDIR="$(pwd)/build-$BUILD_ID"
|
2020-06-03 16:02:34 +03:00
|
|
|
- export TESTS_RES_PATH="$BUILDDIR/tests-res.txt"
|
2018-06-06 00:20:40 +03:00
|
|
|
- mkdir "$BUILDDIR" "$PREFIX"
|
2019-03-18 17:51:07 +03:00
|
|
|
|
2019-10-20 18:19:03 +03:00
|
|
|
.build-native-meson:
|
2019-03-18 17:51:07 +03:00
|
|
|
extends: .build-native
|
2020-06-03 16:02:34 +03:00
|
|
|
tags:
|
|
|
|
- kvm
|
2018-07-22 17:38:54 +03:00
|
|
|
script:
|
|
|
|
- export PATH=~/.local/bin:$PATH
|
|
|
|
- cd "$BUILDDIR"
|
2019-10-20 18:19:03 +03:00
|
|
|
- meson --prefix="$PREFIX" ${MESON_OPTIONS} ..
|
2018-07-22 17:38:54 +03:00
|
|
|
- ninja -k0
|
|
|
|
- ninja install
|
2020-06-03 16:02:34 +03:00
|
|
|
- virtme-run --rw --pwd --kimg /weston-virtme/bzImage --script-dir ../.gitlab-ci/virtme-scripts
|
|
|
|
- TEST_RES=$(cat $TESTS_RES_PATH)
|
|
|
|
- rm $TESTS_RES_PATH
|
|
|
|
- cp -R /weston-virtme ./
|
|
|
|
- rm weston-virtme/bzImage
|
|
|
|
- exit $TEST_RES
|
2018-07-22 17:38:54 +03:00
|
|
|
artifacts:
|
2019-06-14 16:00:07 +03:00
|
|
|
name: weston-$CI_COMMIT_SHA
|
2018-07-22 17:38:54 +03:00
|
|
|
when: always
|
|
|
|
paths:
|
2020-03-02 16:05:08 +03:00
|
|
|
- build-*/*.png
|
2019-01-31 05:06:22 +03:00
|
|
|
- build-*/meson-logs
|
2020-06-03 16:02:34 +03:00
|
|
|
- build-*/weston-virtme
|
2018-07-22 17:38:54 +03:00
|
|
|
- prefix-*
|
2021-02-08 14:32:35 +03:00
|
|
|
reports:
|
|
|
|
junit: build-*/meson-logs/testlog.junit.xml
|
2019-06-14 16:00:07 +03:00
|
|
|
|
2020-12-02 23:30:34 +03:00
|
|
|
.build-native-meson-no-test:
|
|
|
|
extends: .build-native
|
|
|
|
tags:
|
|
|
|
- kvm
|
|
|
|
script:
|
|
|
|
- export PATH=~/.local/bin:$PATH
|
|
|
|
- cd "$BUILDDIR"
|
|
|
|
- meson --prefix="$PREFIX" ${MESON_OPTIONS} ..
|
|
|
|
- ninja -k0
|
|
|
|
- ninja install
|
|
|
|
- ninja clean
|
|
|
|
artifacts:
|
|
|
|
name: weston-$CI_COMMIT_SHA
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- build-*/meson-logs
|
|
|
|
- prefix-*
|
|
|
|
|
2019-10-20 18:19:03 +03:00
|
|
|
build-native-meson-default-options:
|
|
|
|
variables:
|
|
|
|
MESON_OPTIONS: >
|
2019-11-21 16:06:30 +03:00
|
|
|
-Doptimization=0
|
|
|
|
-Db_coverage=true
|
2019-10-20 18:19:03 +03:00
|
|
|
-Dwerror=true
|
|
|
|
extends: .build-native-meson
|
2019-11-21 16:06:30 +03:00
|
|
|
after_script:
|
|
|
|
- ninja -C build-* coverage-html
|
|
|
|
- ninja -C build-* coverage-xml
|
2021-03-04 18:35:09 +03:00
|
|
|
- sed -i -e 's/\/build-weston-build-native-meson-default-options//' -e 's/\"..\//\"/' build-*/meson-logs/coverage.xml
|
2019-11-21 16:06:30 +03:00
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
cobertura: build-*/meson-logs/coverage.xml
|
2019-10-20 18:19:03 +03:00
|
|
|
|
2020-12-02 23:30:34 +03:00
|
|
|
build-docs:
|
|
|
|
variables:
|
|
|
|
MESON_OPTIONS: >
|
|
|
|
-Dwerror=true
|
|
|
|
-Ddoc=true
|
|
|
|
extends: .build-native-meson-no-test
|
|
|
|
|
2019-10-20 18:19:03 +03:00
|
|
|
build-native-meson-no-gl-renderer:
|
|
|
|
variables:
|
|
|
|
MESON_OPTIONS: >
|
|
|
|
-Dsimple-clients=damage,im,shm,touch,dmabuf-v4l
|
|
|
|
-Drenderer-gl=false
|
|
|
|
-Dremoting=false
|
2020-07-15 12:01:04 +03:00
|
|
|
-Dpipewire=false
|
2019-10-20 18:19:03 +03:00
|
|
|
-Dwerror=true
|
|
|
|
extends: .build-native-meson
|
|
|
|
|
2019-11-21 16:06:30 +03:00
|
|
|
docs-and-coverage:
|
2019-11-26 15:14:58 +03:00
|
|
|
stage: pages
|
|
|
|
script:
|
2020-12-02 23:30:34 +03:00
|
|
|
- mv prefix-weston-build-docs/share/doc/weston Documentation
|
2019-11-21 16:06:30 +03:00
|
|
|
- mv build-weston-build-native-meson-default-options/meson-logs/coveragereport Test_Coverage
|
2019-11-26 15:14:58 +03:00
|
|
|
- rm -rf build-* prefix-*
|
|
|
|
dependencies:
|
2020-12-02 23:30:34 +03:00
|
|
|
- build-docs
|
2019-11-21 16:06:30 +03:00
|
|
|
- build-native-meson-default-options
|
2019-11-26 15:14:58 +03:00
|
|
|
artifacts:
|
2019-11-21 16:06:30 +03:00
|
|
|
expose_as: 'Documentation preview and test coverage report'
|
2019-11-26 15:14:58 +03:00
|
|
|
paths:
|
|
|
|
- Documentation/
|
2019-11-21 16:06:30 +03:00
|
|
|
- Test_Coverage/
|
2019-11-26 15:14:58 +03:00
|
|
|
|
2019-06-14 16:00:07 +03:00
|
|
|
pages:
|
|
|
|
stage: pages
|
|
|
|
dependencies:
|
2020-12-02 23:30:34 +03:00
|
|
|
- build-docs
|
2019-06-14 16:00:07 +03:00
|
|
|
script:
|
2020-12-02 23:30:34 +03:00
|
|
|
- export PREFIX=$(pwd)/prefix-weston-build-docs
|
2019-06-14 16:00:07 +03:00
|
|
|
- mkdir public
|
2019-06-25 17:17:08 +03:00
|
|
|
- cp -R $PREFIX/share/doc/weston/* public/
|
2019-06-14 16:00:07 +03:00
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- public
|
|
|
|
only:
|
|
|
|
- master
|