forked from KDE/krita
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
96 lines (87 loc) · 2.7 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
# 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"
.nightly-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule" && $KRITACI_SCHEDULED_JOB_NAME == "nightly"
when: always
.ci-manual-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: manual
.ci-always-job-mixin:
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
- when: always
.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"
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"
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
- 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
when: never
# Allow merge request pipelines.
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
# Build tags and branches too
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
- if: $CI_COMMIT_BRANCH =~ /^krita\//
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