.gitlab-ci.yml 5.23 KB
Newer Older
1
2
3
4
5
6
7
8
9
stages:
- stage1
- stage2
# - analysis
# - documentation
# - deploy

# Todo: Doxygen doc should be published with pages.

10
11
.build_template: &build_template
    stage: stage1
12
    image: registry.gitlab.inria.fr/morefem/thirdpartycompilationfactory/${OS}-${COMPILER}-${MODE}:rc19.11
13
    cache:
14
        key: "cache_${CI_COMMIT_REF_SLUG}_${OS}-${COMPILER}-${MODE}-${LIB_NATURE}-UniqueLib_${IS_ONLY_ONE_LIB}"
15
        untracked: true
16
17
        paths:
            - build
18
    artifacts:
19
        name: "artifact_${CI_COMMIT_REF_SLUG}_${OS}-${COMPILER}-${MODE}-${LIB_NATURE}-UniqueLib_${IS_ONLY_ONE_LIB}"
20
21
22
        expire_in: 2 hours
        paths:
            - build/compilation.log
23
    script:
24
        - mkdir -p build
25
        - cd build && python ../cmake/Scripts/configure_cmake.py --cache_file=../cmake/PreCache/linux.cmake --cmake_args="-G Ninja"  --third_party_directory=/opt --mode=${MODE} --library_type=${LIB_NATURE}  --morefem_as_single_library=${IS_ONLY_ONE_LIB}
26
        - ninja |& tee compilation.log
27
        - ninja test # as asrtifact are limited in size, I can;'t unfortunately use a separate stage...
28
29
    
    
30
31
32
33
34
35
36
37
38
39
40
41
.run_doxygen_template: &run_doxygen_template
    stage: stage1
    image: alpine:latest
    artifacts:
        name: "doxygen"
        expire_in: 2 hours
        paths:
            - complete.log
    script:
        - cd Documentation/Doxygen
        - doxygen complete_dev_guide.dox
    
42
43
.check_warning_template: &check_warning_template
    stage: stage2
44
45
46

    image: alpine:latest
    before_script:
47
        - apk add --update python python-dev && rm -rf /var/cache/apk/*
48
49
50
51
52
53
    # dependencies: in the instantiations!
    script:
        - python Scripts/Tools/find_warning_in_compilation_log.py --log build/compilation.log
    allow_failure: true
    
    
54
    
55
56
57
58
59
60
61
62
63
64
# .test_template: &test_template
#    stage: stage2
#    image: registry.gitlab.inria.fr/morefem/thirdpartycompilationfactory/${OS}-${COMPILER}-${MODE}:latest
#    cache:
#        key: "${CI_COMMIT_REF_SLUG}_${OS}-${COMPILER}-${MODE}-${LIB_NATURE}-UniqueLib_${IS_ONLY_ONE_LIB}"
#        untracked: true
#        paths:
#            - build
#    script:
#      - cd build && ctest   
65

66
67
68
69
70
71
72
73
74
#
# build-Ubuntu-gcc-debug-shared-several_libs:
#   <<: *build_template
#   variables:
#       OS: "ubuntu"
#       COMPILER: "gcc"
#       MODE: "debug"
#       LIB_NATURE: "shared"
#       IS_ONLY_ONE_LIB: "False"
75

76

77
78
79
80
81
82
83
84
85
# build-Ubuntu-gcc-release-static-unique_lib:
#   <<: *build_template
#   variables:
#       OS: "ubuntu"
#       COMPILER: "gcc"
#       MODE: "release"
#       LIB_NATURE: "static"
#       IS_ONLY_ONE_LIB: "True"
#
86

87
88
89
90
91
92
93
94
95
96
#
# build-Fedora-gcc-debug-static-one_lib:
#   <<: *build_template
#   variables:
#       OS: "fedora"
#       COMPILER: "gcc"
#       MODE: "debug"
#       LIB_NATURE: "static"
#       IS_ONLY_ONE_LIB: "True"
#
97

98
99
100
101
102
103
104
105
106
# build-Fedora-gcc-release-shared-several_libs:
#   <<: *build_template
#   variables:
#       OS: "fedora"
#       COMPILER: "gcc"
#       MODE: "release"
#       LIB_NATURE: "shared"
#       IS_ONLY_ONE_LIB: "False"
#
107

108

109
110
build-Ubuntu-gcc-debug-shared-several_libs:
  <<: *build_template
GILLES Sebastien's avatar
GILLES Sebastien committed
111
112
113
114
  tags: 
       - ubuntu
       - gcc
       - debug
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
  variables:
      OS: "ubuntu"
      COMPILER: "gcc"
      MODE: "debug"
      LIB_NATURE: "shared"
      IS_ONLY_ONE_LIB: "False"
      
      
check_Ubuntu-gcc-debug-shared-several_libs:
  <<: *check_warning_template
  dependencies: 
      - build-Ubuntu-gcc-debug-shared-several_libs
  variables:
      OS: "ubuntu"
      COMPILER: "gcc"
      MODE: "debug"
      LIB_NATURE: "shared"
      IS_ONLY_ONE_LIB: "False"

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154

build-Fedora-clang-debug-static-one_lib:
  <<: *build_template
  variables:
      OS: "fedora"
      COMPILER: "clang"
      MODE: "debug"
      LIB_NATURE: "static"
      IS_ONLY_ONE_LIB: "True"


check_warning_Fedora-clang-debug-static-one_lib:
  <<: *check_warning_template
  dependencies:
      - build-Fedora-clang-debug-static-one_lib
  variables:
      OS: "fedora"
      COMPILER: "clang"
      MODE: "debug"
      LIB_NATURE: "static"
      IS_ONLY_ONE_LIB: "True"
155

156
      
157
158
159
160
161
162
163
164
# build-Fedora-clang-release-shared-several_libs:
#   <<: *build_template
#   variables:
#       OS: "fedora"
#       COMPILER: "clang"
#       MODE: "release"
#       LIB_NATURE: "shared"
#       IS_ONLY_ONE_LIB: "False"
165

166
167
168
      
# build-macos-clang-debug-shared-several_libs:
#   <<: *build_template
169
#   tags:
170
171
172
173
174
175
176
#       - macos, debug, shared, several_libs
#   variables:
#       OS: "macos"
#       COMPILER: "clang"
#       MODE: "debug"
#       LIB_NATURE: "shared"
#       IS_ONLY_ONE_LIB: "False"
177
#
178

179
180
181
182
183
184
185
186
187
188
189
190
191
192
# doxygen:
#     stage: stage1
#
#     cache:
#       key: "$CI_COMMIT_REF_SLUG_doxygen"
#       untracked: true
#       paths:
#           - Documentation/Doxygen
#     tags:
#         - Ubuntu
#         - debug
#     script:
#         - cd Documentation/Doxygen
#         - doxygen complete_dev_guide.dox
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214


# Pages doesn't work as invoked from a subgroup (not supported yet in gitlab)    
# pages:
#     stage: deploy
#     cache:
#       key: "$CI_COMMIT_REF_SLUG_doxygen"
#       untracked: true
#       paths:
#           - Documentation/Doxygen
#     before_script:
#         - mkdir -p public
#     tags:
#         - linux
#         - debug
#     script:
#         - cd Documentation/Doxygen
#         - mv Complete/* ../../public/
#     artifacts:
#         paths:
#           - public