summaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
blob: 0a55ca34e33c3d019d866e3123ce5cb5b80a65a8 (plain)
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
.only_settings: &only_settings
    - merge_requests
    - branches@cmake/cmake
    - tags@cmake/cmake

.fedora31: &fedora31
    image: "kitware/cmake:ci-fedora31-x86_64-2020-05-05"

    variables:
        GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"

.debian10: &debian10
    image: "kitware/cmake:ci-debian10-x86_64-2020-04-27"

    variables:
        GIT_CLONE_PATH: "$CI_BUILDS_DIR/gitlab-kitware-cmake ci"

.debian10_iwyu: &debian10_iwyu
    extends: .debian10

    variables:
        CMAKE_CONFIGURATION: debian10_iwyu
        CTEST_NO_WARNINGS_ALLOWED: 1

.fedora31_tidy: &fedora31_tidy
    extends: .fedora31

    variables:
        CMAKE_CONFIGURATION: fedora31_tidy
        CTEST_NO_WARNINGS_ALLOWED: 1

.fedora31_sphinx: &fedora31_sphinx
    extends: .fedora31

    variables:
        CMAKE_CONFIGURATION: fedora31_sphinx
        CTEST_NO_WARNINGS_ALLOWED: 1
        CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx"

before_script:
    - .gitlab/ci/cmake.sh
    - .gitlab/ci/ninja.sh
    - export PATH=$PWD/.gitlab:$PWD/.gitlab/cmake/bin:$PATH
    - cmake --version
    - ninja --version

.cmake_build_unix: &cmake_build_unix
    stage: build
    only: *only_settings
    tags:
        - build
        - docker
        - linux

    script:
        - .gitlab/ci/sccache.sh
        - sccache --start-server
        - sccache --show-stats
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
        - sccache --show-stats

    interruptible: true

stages:
    - build
    - test

build:debian10-iwyu:
    <<:
        - *debian10_iwyu
    stage: build
    only: *only_settings
    tags:
        - build
        - docker
        - linux

    script:
        - .gitlab/ci/sccache.sh
        - sccache --start-server
        - sccache --show-stats
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
        - sccache --show-stats
    interruptible: true

build:fedora31-tidy:
    <<:
        - *fedora31_tidy
    stage: build
    only: *only_settings
    tags:
        - build
        - docker
        - linux

    script:
        - .gitlab/ci/sccache.sh
        - sccache --start-server
        - sccache --show-stats
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
        - sccache --show-stats
    interruptible: true

build:fedora31-sphinx:
    <<:
        - *fedora31_sphinx
    stage: build
    only: *only_settings
    tags:
        - build
        - docker
        - linux
        - linux-3.17 # Needed to be able to load Fedora's Qt libraries.

    script:
        - .gitlab/ci/sccache.sh
        - sccache --start-server
        - sccache --show-stats
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_configure.cmake"
        - "$LAUNCHER ctest -VV -S .gitlab/ci/ctest_build.cmake"
        - sccache --show-stats
    interruptible: true