-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
75 lines (68 loc) · 2.06 KB
/
.gitlab-ci.yml
File metadata and controls
75 lines (68 loc) · 2.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# SPDX-FileCopyrightText: 2022 Uwe Scholz <u.scholz83@gmx.de>
# SPDX-FileCopyrightText: 2024 Andrey Kutejko <andy128k@gmail.com>
# SPDX-FileCopyrightText: 2026 Wladimir Palant https://palant.info/
#
# SPDX-License-Identifier: CC0-1.0
image: ubuntu:24.04
stages:
- build
- release
variables:
MESON_BUILD_DIR: "_build"
TARBALL_ARTIFACT_PATH: "${MESON_BUILD_DIR}/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
UBUNTU_DEPS:
appstream-util
desktop-file-utils
build-essential
meson
gettext
yelp-tools
gi-docgen
gobject-introspection
libexiv2-dev
libgsf-1-dev
libgtk-4-dev
libpoppler-glib-dev
libtag1-dev
libvte-2.91-gtk4-dev
curl
include:
- component: "gitlab.gnome.org/GNOME/citemplates/release-service@master"
inputs:
job-stage: release
dist-job-name: "create_tarball"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
before_script:
- export DEBIAN_FRONTEND=noninteractive
- export RUSTUP_HOME=/usr/local
- export CARGO_HOME=/usr/local
build_and_test:
stage: build
script:
- apt-get update
- apt-get install -y $UBUNTU_DEPS xvfb
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- rustup install stable
- mkdir ${MESON_BUILD_DIR}
- meson setup ${MESON_BUILD_DIR}
- meson compile -C ${MESON_BUILD_DIR}
- exit_code=0
- xvfb-run meson test -C ${MESON_BUILD_DIR} || exit_code=$?; if [ "$exit_code" != "0" ]; then echo "Unit tests failed."; cat ${MESON_BUILD_DIR}/meson-logs/testlog.txt; exit 1; fi;
create_tarball:
stage: release
script:
- apt-get update
- apt-get install -y $UBUNTU_DEPS git-core
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
- rustup install stable
- mkdir ${MESON_BUILD_DIR}
- meson setup ${MESON_BUILD_DIR}
- meson compile -C ${MESON_BUILD_DIR}
- meson dist -C ${MESON_BUILD_DIR} --no-tests
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
when: "always"
paths:
- "${TARBALL_ARTIFACT_PATH}"
rules:
- if: $CI_COMMIT_TAG