-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy path.gitlab-ci.yml
89 lines (84 loc) · 3.01 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
stages:
- test
- pages
- tarball
- release
variables:
TARBALL_PATH_PREFIX: ${CI_PROJECT_NAME}-${CI_COMMIT_TAG}
TARBALL_NAME: ${TARBALL_PATH_PREFIX}.tar.xz
include:
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
job-stage: release
dist-job-name: "tarball"
tarball-artifact-path: "${TARBALL_NAME}"
flatpak:
image: "quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master"
stage: test
tags:
- flatpak
variables:
BUNDLE: "evolution-data-server-nightly.flatpak"
MANIFEST_PATH: "data/org.gnome.EvolutionDataServer.Devel.json"
FLATPAK_MODULE: "evolution-data-server"
APP_ID: "org.gnome.EvolutionDataServer.Devel"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
before_script:
- export PATH="/usr/lib/ccache:$PATH"
- export CCACHE_BASEDIR="$PWD"
- export CCACHE_DIR="$PWD/ccache"
script:
- jq -M '(.modules[] | select(.name=="evolution-data-server")).sources[0].url = env.CI_REPOSITORY_URL' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
- jq -M 'del((.modules[] | select(.name=="evolution-data-server")).sources[0].branch)' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
- jq -M '(.modules[] | select(.name=="evolution-data-server")).sources[0].commit = env.CI_COMMIT_SHA' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --verbose --keep-build-dirs --user --disable-rofiles-fuse flatpak_app --repo=repo --ccache ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
cache:
paths:
- ccache
- .flatpak-builder
artifacts:
name: "Flatpak artifacts"
expose_as: "Get Flatpak bundle here"
when: "always"
paths:
- "${BUNDLE}"
- ".flatpak-builder/build/${FLATPAK_MODULE}/evolution-data-server-config.h"
- ".flatpak-builder/build/${FLATPAK_MODULE}/CMakeFiles/CMakeError.log"
- ".flatpak-builder/build/${FLATPAK_MODULE}/CMakeFiles/CMakeOutput.log"
- ".flatpak-builder/build/${FLATPAK_MODULE}/docs/"
expire_in: 14 days
pages:
stage: pages
dependencies:
- flatpak
interruptible: false
variables:
FLATPAK_MODULE: "evolution-data-server"
script:
- "mkdir public"
- "mv .flatpak-builder/build/${FLATPAK_MODULE}/docs/* ./public"
- "rm -R ./public/reference"
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
tarball:
stage: tarball
image: "quay.io/gnome_infrastructure/gnome-runtime-images:gnome-master"
dependencies:
- flatpak
allow_failure: false
script:
- git config --global --add safe.directory `pwd`
- git archive --prefix=${TARBALL_PATH_PREFIX}/ HEAD | xz -z > ${TARBALL_NAME}
artifacts:
name: "${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
expire_in: 14 days
paths:
- "${TARBALL_NAME}"
rules:
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_PROTECTED