.gitlab-ci.yml 2.93 KB
Newer Older
Edwin Carlinet's avatar
Edwin Carlinet committed
1
2
3
stages:
    - build
    - test
4
    - bench
Edwin Carlinet's avatar
Edwin Carlinet committed
5
6
    - deploy

7
8
image: carlinet/buildimage

Edwin Carlinet's avatar
Edwin Carlinet committed
9

Michaël Roynard's avatar
Michaël Roynard committed
10
11
12
13
14

build-doc-images:
    stage: build
    script:
        - mkdir build && cd build
15
        - conan install .. -pr buildfarm --build=missing
16
        - cmake -DPYLENE_BUILD_BENCHMARKS=NO .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION
Michaël Roynard's avatar
Michaël Roynard committed
17
18
19
20
21
22
23
        - cmake --build .
                --config Release
                --target build-images
    artifacts:
        paths:
            - doc/source/images

24
25
26
27
########
# Test #
########

Edwin Carlinet's avatar
Edwin Carlinet committed
28
29
30
31
.job-build-linux-base: &distcheck-linux-base
    stage: test
    script:
        - mkdir build && cd build
32
        - conan install .. -pr buildfarm  --build=missing
33
        - cmake .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION
Michaël Roynard's avatar
Michaël Roynard committed
34
35
36
        - cmake --build .
                --config $PYLENE_CONFIGURATION
                --target check
37
    dependencies: []
38
39
40
    artifacts:
        reports:
            junit: build/tests/UT*.xml
Edwin Carlinet's avatar
Edwin Carlinet committed
41
42


43

Edwin Carlinet's avatar
Edwin Carlinet committed
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
distcheck-linux-gcc-release:
    <<: *distcheck-linux-base
    variables:
        PYLENE_CONFIGURATION: "Release"
        CXX: "g++"
        CC: "gcc"

distcheck-linux-clang-release:
    <<: *distcheck-linux-base
    variables:
        PYLENE_CONFIGURATION: "Release"
        CXX: "clang++"
        CC: "clang"

distcheck-linux-gcc-debug:
    <<: *distcheck-linux-base
    variables:
        PYLENE_CONFIGURATION: "Debug"
        CXX: "g++"
        CC: "gcc"

distcheck-linux-clang-debug:
    <<: *distcheck-linux-base
    variables:
        PYLENE_CONFIGURATION: "Debug"
        CXX: "clang++"
        CC: "clang"


73
74
75
76
77
78
79
80
#########
# Bench #
#########

.job-bench-linux-base: &distbench-linux-base
    stage: bench
    script:
        - mkdir build && cd build
81
        - conan install .. -pr buildfarm  --build=missing
82
        - cmake .. -DCMAKE_BUILD_TYPE=$PYLENE_CONFIGURATION
83
        - cmake --build . --target fetch-external-data
Michaël Roynard's avatar
Michaël Roynard committed
84
85
        - cmake --build .
                --config $PYLENE_CONFIGURATION
86
87
                --target run-all-benchmarks
        - ctest -L SpeedTests -V
Edwin Carlinet's avatar
Edwin Carlinet committed
88
    tags: [ "pylene-benchmarks" ]
89
90
    when: manual
    dependencies: []
Michaël Roynard's avatar
Michaël Roynard committed
91
92
93
94
    artifacts:
         name: "benchmark-results"
         paths:
             - build/bench/*.json
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110

distbench-linux-gcc-release:
    <<: *distbench-linux-base
    variables:
        PYLENE_CONFIGURATION: "Release"
        CXX: "g++"
        CC: "gcc"

distbench-linux-clang-release:
    <<: *distbench-linux-base
    variables:
        PYLENE_CONFIGURATION: "Release"
        CXX: "clang++"
        CC: "clang"


Edwin Carlinet's avatar
Edwin Carlinet committed
111
112
113
114
115
116
117
118
119
120
#################
# Documentation #
#################

.documentation-base:  &documentation-base
    stage: test
    script:
        - cd doc
        - doxygen
        - sphinx-build -b html source ../public
121
    dependencies: [build-doc-images]
Edwin Carlinet's avatar
Edwin Carlinet committed
122
123
124
125
126
127
128
129
130
    artifacts:
        name: "documentation"
        paths:
            - public/

# Generate doc only
documentation:
    <<: *documentation-base
    except:
131
132
        - dev

Edwin Carlinet's avatar
Edwin Carlinet committed
133

134
135
136
##########
# Deploy #
##########
Edwin Carlinet's avatar
Edwin Carlinet committed
137
138
139
pages:
    <<: *documentation-base
    only:
140
        - dev