1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-11-15 12:55:36 +00:00
Purism-Calls/.gitlab-ci.yml

154 lines
4.5 KiB
YAML
Raw Normal View History

include:
- 'https://source.puri.sm/Librem5/librem5-ci/raw/master/librem5-pipeline-definitions.yml'
stages:
- build
- test
- package
- test-package
2021-07-12 08:30:14 +00:00
variables:
L5_DOCKER_IMAGE: debian:bullseye
build:native:
stage: build
artifacts:
paths:
- _build
2020-12-04 17:39:53 +00:00
variables:
2021-04-27 02:46:34 +00:00
COMMON_BUILD_OPTS: -Db_coverage=true --werror
2020-12-04 17:39:53 +00:00
BUILD_OPTS: -Dgtk_doc=true ${COMMON_BUILD_OPTS}
WANT_BUILD_DEPS: "true"
2021-07-12 08:30:14 +00:00
EXP_DEPS: libhandy-1-dev/experimental libhandy-1-0/experimental gir1.2-handy-1/experimental libgladeui-common/experimental
except:
variables:
- $PKG_ONLY == "1"
2021-07-12 08:30:14 +00:00
image: debian:bullseye
tags: []
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
2021-07-12 08:30:14 +00:00
- apt-get -y install eatmydata
- echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/exp.list
- eatmydata apt-get -y update
- eatmydata apt-get -y install $EXP_DEPS
- eatmydata apt-get -y install lcov
- '[ "${WANT_BUILD_DEPS}" != "true" ] || eatmydata apt-get -y build-dep .'
- ulimit -c unlimited
script:
- 'echo "Build opts: ${BUILD_OPTS}"'
- meson ${BUILD_OPTS} . _build
- ninja -C _build
test:native:
extends: build:native
stage: test
dependencies:
- build:native
script:
- export LC_ALL=C.UTF-8
- xvfb-run -s -noreset ninja -C _build test
2021-04-27 02:46:34 +00:00
- cp _build/src/libcalls-vala.a.p/*.c _build
- ninja -C _build coverage
coverage: '/^\s+lines\.+:\s+([\d.]+\%)\s+/'
2020-12-04 17:39:53 +00:00
build-gtkdoc:
extends: build:native
2020-12-04 17:39:53 +00:00
stage: test
dependencies:
- build:native
script:
- ninja -C _build calls-doc
- mv _build/doc/html/ _reference/
artifacts:
paths:
- _reference
check-po:
extends: build:native
stage: test
dependencies:
- build:native
before_script:
- apt-get -y update
- apt-get -y install intltool
script:
# barf on untranslated C files. Seems intltool
# can't be told to exit with non-zero exit status
# in this case
- cd po/
- intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0
2021-06-22 04:26:57 +00:00
2021-07-16 17:23:59 +00:00
validate-metadata:
stage: test
image: debian:bullseye
tags: []
before_script:
- export DEBIAN_FRONTEND=noninteractive
- apt-get -y update
- apt-get -y install appstream-util
script:
- appstream-util validate data/org.gnome.Calls.metainfo.xml
2021-07-12 08:30:14 +00:00
package-debian-bullseye:
variables:
EXP_DEPS: libhandy-1-dev/experimental libhandy-1-0/experimental gir1.2-handy-1/experimental libgladeui-common/experimental
tags: []
extends: .l5-build-debian-package
before_script:
- echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/exp.list
- apt-get -y update
- apt-get -y install $EXP_DEPS
package-debian-bullseye:arm64:
variables:
EXP_DEPS: libhandy-1-dev/experimental libhandy-1-0/experimental gir1.2-handy-1/experimental libgladeui-common/experimental
tags:
- aarch64
extends: .l5-build-debian-package
before_script:
- echo "deb http://deb.debian.org/debian/ experimental main" > /etc/apt/sources.list.d/exp.list
- apt-get -y update
- apt-get -y install $EXP_DEPS
2021-06-22 04:26:57 +00:00
# For some reason including https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml fails with a network error (status code 500), therefore it's copied here
.flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
stage: 'package'
interruptible: true
tags:
- flatpak
script:
- rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS}
- flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
- tar cf repo.tar repo/
artifacts:
name: 'Flatpak artifacts'
expose_as: 'Get Flatpak bundle here'
when: 'always'
paths:
- "${BUNDLE}"
- 'repo.tar'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
- '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt'
expire_in: 14 days
cache:
key: "$CI_JOB_NAME"
paths:
- '.flatpak-builder/downloads'
- '.flatpak-builder/git'
flatpak:master:
extends: .flatpak
stage: package
variables:
MANIFEST_PATH: "org.gnome.Calls.json"
2021-06-22 04:26:57 +00:00
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "calls"
MESON_ARGS: ""
APP_ID: "org.gnome.Calls"
2021-06-22 04:26:57 +00:00
BUNDLE: "calls.flatpak"