-
-
Notifications
You must be signed in to change notification settings - Fork 587
/
.gitlab-ci.yml
132 lines (119 loc) · 3.87 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
# SPDX-FileCopyrightText: 2021 Felipe Lema <[email protected]>
# SPDX-FileCopyrightText: 2022 Nicolás Alvarez <[email protected]>
# SPDX-License-Identifier: CC0-1.0
variables:
DEBIAN_FRONTEND: "noninteractive"
release_branch_pattern: '/^release\/.*/'
variables:
DEPS_BRANCH_NAME_WINDOWS: 'master'
DEPS_BRANCH_NAME_LINUX: 'master'
DEPS_BRANCH_NAME_MACOS: 'master'
DEPS_BRANCH_NAME_ANDROID: 'master'
DEPS_REPO_BRANCH_NAME_WINDOWS: 'master'
DEPS_REPO_BRANCH_NAME_LINUX: 'master'
DEPS_REPO_BRANCH_NAME_MACOS: 'master'
DEPS_REPO_BRANCH_NAME_ANDROID: 'master'
.nightly-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $KRITACI_SCHEDULED_JOB_NAME == "nightly"
when: always
.weekly-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $KRITACI_SCHEDULED_JOB_NAME == "weekly"
when: always
.ci-manual-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_BRANCH =~ $release_branch_pattern
when: never
- when: manual
.ci-always-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_BRANCH =~ $release_branch_pattern
when: never
- when: always
.ci-release-job-mixin:
interruptible: false
rules:
- if: $CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH =~ $release_branch_pattern
when: manual
.ci-artifacts-with-packages-mixin:
artifacts:
name: krita-$CI_COMMIT_REF_SLUG-$CI_COMMIT_REF_NAME
expire_in: 10 days
when: always
paths:
- "**/failed_test_shot_*.png" # deprecated use appium_artifact_ instead
- "**/appium_artifact_*"
- "*.log"
# Windows packages
- "krita-*.zip"
- "krita-*-setup.exe"
- "krita-*.msix"
# Linux, MacOS and Android packages
- "_packaging"
# Logs from MacOS signer/notarizer
- "_dmg/*.log"
reports:
junit: JUnitTestResults.xml
coverage_report:
coverage_format: cobertura
path: CoberturaLcovResults.xml
# nightly packages should not store the packages, since
# they are uploaded to CDN
.ci-artifacts-without-packages-mixin:
artifacts:
name: krita-$CI_COMMIT_REF_SLUG-$CI_COMMIT_REF_NAME-no-packages
expire_in: 10 days
when: always
paths:
- "**/failed_test_shot_*.png" # deprecated use appium_artifact_ instead
- "**/appium_artifact_*"
- "*.log"
- "_packaging/*.log"
# Logs from MacOS signer/notarizer
- "_dmg/*.log"
reports:
junit: JUnitTestResults.xml
coverage_report:
coverage_format: cobertura
path: CoberturaLcovResults.xml
clang_format:
stage: build
image: debian:testing
before_script:
- apt-get update
- apt-get install --yes --no-install-recommends wget ca-certificates git clang-format-11
- update-ca-certificates
script:
- ./.gitlab-ci.script
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- if: $CI_COMMIT_BRANCH =~ $release_branch_pattern
when: never
- when: manual
allow_failure: true
workflow:
rules:
# Prevent branch pipelines if an MR is open on the branch.
- if: $CI_COMMIT_BRANCH && $CI_PIPELINE_SOURCE == "push" && $CI_OPEN_MERGE_REQUESTS && $CI_COMMIT_BRANCH !~ $release_branch_pattern
when: never
# Allow merge request pipelines.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# don't create pipelines for tags, since it is impossible to sign them
- if: $CI_COMMIT_TAG
when: never
# Build branches too
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ /^krita\//
- if: $CI_COMMIT_BRANCH =~ $release_branch_pattern
include:
- local: /build-tools/ci-scripts/cppcheck.yml
- local: /build-tools/ci-scripts/linux.yml
- local: /build-tools/ci-scripts/windows.yml
- local: /build-tools/ci-scripts/android.yml
- local: /build-tools/ci-scripts/macos.yml