-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy path.gitlab-ci.yml
144 lines (131 loc) · 4.62 KB
/
.gitlab-ci.yml
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
include:
- project: "GNOME/citemplates"
file: "flatpak/flatpak_ci_initiative.yml"
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
job-stage: release
dist-job-name: "flatpak@x86_64"
tarball-artifact-path: "${TARBALL_ARTIFACT_PATH}"
variables:
GIT_SUBMODULE_STRATEGY: normal
MESON_BUILD_DIR: _build
TARBALL_ARTIFACT_PATH: ".flatpak-builder/build/nautilus/_flatpak_build/meson-dist/${CI_PROJECT_NAME}-${CI_COMMIT_TAG}.tar.xz"
stages:
- image
- review
- test
- analyze
- deploy
- release
.vars-devel:
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.json"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.NautilusDevel"
BUNDLE: "nautilus-dev.flatpak"
rules:
# Disable tests for protected tags
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED
variables:
CONFIG_OPTS: '--libdir=/app/lib -Dprofile=Devel -Dtests=none'
- when: always
workflow:
rules:
# Run merge request pipelines, for main or release branches, for manually
# triggered pipelines (source "web"), and tags, but not for translation updates
- if: ($CI_PIPELINE_SOURCE == "merge_request_event" ||
$CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED ||
$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH ||
$CI_COMMIT_BRANCH =~ /^gnome-.*$/ ||
$CI_PIPELINE_SOURCE == "web") &&
$CI_COMMIT_TITLE !~ /^Update.*translation$/
flatpak@x86_64:
extends: ['.flatpak@x86_64', '.vars-devel']
flatpak@aarch64:
when: manual
rules:
- if: $CI_PROJECT_NAMESPACE == "GNOME" && $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: always
- allow_failure: true
extends: ['.flatpak@aarch64', '.vars-devel']
nightly@x86_64:
extends: '.publish_nightly'
needs: ['flatpak@x86_64']
nightly@aarch64:
extends: '.publish_nightly'
needs: ['flatpak@aarch64']
potfile:
image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: review
script:
- data/check-potfiles.sh
style check:
image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: review
artifacts:
name: 'Style check artifacts'
expose_as: 'Get style check diff here'
when: on_failure
paths:
- 'uncrustify.diff'
expire_in: 14 days
script:
- LANG=C.utf8 data/run-uncrustify.sh
- git diff --exit-code | tee uncrustify.diff
rules:
- if: $CI_COMMIT_BRANCH !~ /^gnome-.*$/
update image:
variables:
STORAGE_DRIVER: vfs
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
image: registry.fedoraproject.org/fedora:latest
stage: image
script:
- dnf install -y buildah runc
- buildah bud --tag $CI_REGISTRY_IMAGE -f .gitlab/Dockerfile
- buildah tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $CI_REGISTRY_IMAGE
- buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
when: manual
rules:
- if: $CI_PROJECT_NAMESPACE != "GNOME"
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_PIPELINE_SOURCE == "web"
asan:
variables:
CFLAGS: "-fno-omit-frame-pointer -fsanitize=address"
LSAN_OPTIONS: suppressions=$CI_PROJECT_DIR/data/leak-suppress.txt
image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: analyze
rules:
- when: manual
allow_failure: true
script:
- meson setup -Dextensions=false -Dintrospection=false -Dtests=all $MESON_BUILD_DIR
- meson compile -C $MESON_BUILD_DIR
- meson test -C $MESON_BUILD_DIR
artifacts:
name: 'Address Sanitizer-built test results'
when: on_failure
paths:
- $MESON_BUILD_DIR/meson-logs/testlog.txt
reports:
junit: $MESON_BUILD_DIR/meson-logs/testlog.junit.xml
expire_in: 7 days
pages:
image: registry.gitlab.gnome.org/gnome/nautilus:latest
stage: deploy
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CI_PROJECT_NAMESPACE == "GNOME"
script:
- meson setup -Ddocs=true -Dextensions=false -Dtests=none $MESON_BUILD_DIR
- ninja -C $MESON_BUILD_DIR
- mv $MESON_BUILD_DIR/docs/reference/nautilus/ public/
artifacts:
paths:
- public/
expire_in: 2 days