File: .gitlab-ci.yml

package info (click to toggle)
scotch 6.0.10-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 18,760 kB
  • sloc: ansic: 79,013; makefile: 3,962; yacc: 622; lex: 267; sh: 155; fortran: 90
file content (175 lines) | stat: -rw-r--r-- 4,308 bytes parent folder | download
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
stages:
  - build
  - test
  - sonar

# JOB_INT: [ 32 | 64 | 32-64 ]
# JOB_THREAD: [ n | c | y ]
# JOB_DEBUG: [ n | a | f ]
# JOB_RENAME: [ n | r ]

.job_template: &matrix_32
  parallel:
    matrix:
      - JOB_INT: [ 32, 32-64 ]
        JOB_THREAD: [ n ]
        JOB_DEBUG: [ n ]
        JOB_RENAME: [ n ]
      - JOB_INT: [ 32-64 ]
        JOB_THREAD: [ n ]
        JOB_DEBUG: [ a ]
        JOB_RENAME: [ n ]
      - JOB_INT: [ 32 ]
        JOB_THREAD: [ n ]
        JOB_DEBUG: [ f ]
        JOB_RENAME: [ n ]

.job_template: &matrix_64
  parallel:
    matrix:
      - JOB_INT: [ 64 ]
        JOB_THREAD: [ n ]
        JOB_DEBUG: [ n ]
        JOB_RENAME: [ n ]
      - JOB_INT: [ 64 ]
        JOB_THREAD: [ n, c ]
        JOB_DEBUG: [ a ]
        JOB_RENAME: [ n ]
      - JOB_INT: [ 64 ]
        JOB_THREAD: [ y ]
        JOB_DEBUG: [ a ]
        JOB_RENAME: [ r ]

.job_template: &cache_template
    untracked: true
    paths:
      - bin
      - ci
      - include
      - lib
      - src
      - tgt
      - analyzer_reports
      - scotch-build-*.log

.job_template: &variables_template
  before_script:
    - . ci/gitlab-ci-env.sh
    - export JOBNAME="${JOB_INT}${JOB_THREAD}${JOB_DEBUG}${JOB_RENAME}"
    - echo ${JOBNAME}
    - export JOBBUILDFLAGS="-O0 -g -fPIC -DCOMMON_FILE_COMPRESS_LZMA"
    - case "${JOB_INT}" in
        32 )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS}" ;;
        32-64 )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DINTSIZE64 -DIDXSIZE64" ;;
        64 )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS}" ;;
      esac
    - case "${JOB_THREAD}" in
        n )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS}" ;;
        c )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DCOMMON_PTHREAD" ;;
        y )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DCOMMON_PTHREAD -DSCOTCH_PTHREAD -DSCOTCH_PTHREAD_NUMBER=2" ;;
      esac
    - export JOBCHECK=""
    - case "${JOB_DEBUG}" in
        n )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS}" ;;
        a )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_DEBUG_ALL -DSCOTCH_METIS_VERSION=5" ;;
        f )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_DEBUG_FULL"
          export JOBCHECK=_full ;;
      esac
    - case "${JOB_RENAME}" in
        n )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS}" ;;
        r )
          export JOBBUILDFLAGS="${JOBBUILDFLAGS} -DSCOTCH_RENAME" ;;
      esac
    - echo ${JOBBUILDFLAGS}

.job_template: &job_build
  stage: build
  <<: *variables_template
  script:
    - cp ci/Makefile.inc src/Makefile.inc
    - cd src
    - sed -i -e "s#^\(CFLAGS.*\)#\1 ${JOBBUILDFLAGS}#1" Makefile.inc
    - find . -name Makefile | xargs sed -i -e "s#-c \$(<)#-c \$\(shell pwd\)/\$\(<\)#g"
    - scan-build -plist --intercept-first --analyze-headers -o ../analyzer_reports make scotch ptscotch esmumps ptesmumps 2>&1 | tee ../scotch-build-${JOBNAME}.log

scotch_build_32:
  <<: *job_build
  tags:
    - 32bits
  cache:
    key: scotch32 $CI_NODE_INDEX
    policy: push
    <<: *cache_template
  <<: *matrix_32

scotch_build_64:
  <<: *job_build
  tags:
    - 64bits
  cache:
    key: scotch64 $CI_NODE_INDEX
    policy: push
    <<: *cache_template
  <<: *matrix_64

.job_template: &job_test
  stage: test
  <<: *variables_template
  artifacts:
    untracked: true
  script:
    - cd src
    - make check${JOBCHECK}
    - make ptcheck${JOBCHECK}
    - make escheck
    - find . -print0 | xargs -0 touch
    - cp libscotch/parser_ll.c libscotch/lex.yy.c
    - cp libscotch/parser_yy.c libscotch/y.tab.c
    - cd $CI_PROJECT_DIR
    - gcovr --xml > scotch-coverage-${JOBNAME}.xml

scotch_test_32:
  <<: *job_test
  cache:
    key: scotch32 $CI_NODE_INDEX
    policy: pull
    <<: *cache_template
  tags:
    - 32bits
  <<: *matrix_32

scotch_test_64:
  <<: *job_test
  cache:
    key: scotch64 $CI_NODE_INDEX
    policy: pull
    <<: *cache_template
  tags:
    - 64bits
  <<: *matrix_64

scotch_sonar:
  stage: sonar
  artifacts:
    paths:
      - analyzer_reports
      - scotch-build-*.log
      - scotch-coverage-*.xml
      - scotch-cppcheck.xml
      - scotch-rats.xml
      - sonar-project.properties
      - sonar.log
  script:
    - ci/analysis.sh
    - ls -l
    - sonar-scanner -X > sonar.log