.gitlab-ci.yml 3.69 KB
Newer Older
Marco Govoni's avatar
Marco Govoni committed
1
variables:
Victor Yu's avatar
Victor Yu committed
2
3
  GIT_STRATEGY: none
  QE_VERSION: qe-6.1.0
Marco Govoni's avatar
Marco Govoni committed
4

Marco Govoni's avatar
Marco Govoni committed
5
stages:
Victor Yu's avatar
Victor Yu committed
6
7
8
9
  - build
  - test
  - doc

Victor Yu's avatar
Victor Yu committed
10
11
# Templates

Marco Govoni's avatar
Marco Govoni committed
12
.template_bot_start:
Marco Govoni's avatar
Marco Govoni committed
13
14
  tags: [rcc,docker,node-01]
  image: miccomcenter/bot:$CI_JOB_NAME
Victor Yu's avatar
Victor Yu committed
15
  before_script:
Marco Govoni's avatar
Marco Govoni committed
16
17
18
19
20
21
22
    - if [ -z $GCC_VERSION ]; then echo "not set"; else echo $GCC_VERSION; fi
    - if [ -z $LAPACK_VERSION ]; then echo "not set"; else echo $LAPACK_VERSION; fi
    - if [ -z $XERCES_VERSION ]; then echo "not set"; else echo $XERCES_VERSION; fi
    - if [ -z $OPENMPI_VERSION ]; then echo "not set"; else echo $OPENMPI_VERSION; fi
    - if [ -z $MPICH_VERSION ]; then echo "not set"; else echo $MPICH_VERSION; fi
    - if [ -z $SCALAPACK_VERSION ]; then echo "not set"; else echo $SCALAPACK_VERSION; fi
    - if [ -z $FFTW_VERSION ]; then echo "not set"; else echo $FFTW_VERSION; fi
Victor Yu's avatar
Victor Yu committed
23
24
25
    - if [ -z $PYTHON_VERSION ]; then echo "not set"; else echo $PYTHON_VERSION; fi
    - if [ -z $PYTHON_PIP_VERSION ]; then echo "not set"; else echo $PYTHON_PIP_VERSION; fi

Marco Govoni's avatar
Marco Govoni committed
26
27
.template_build:
  stage: build
Marco Govoni's avatar
Marco Govoni committed
28
  script:
Victor Yu's avatar
Victor Yu committed
29
    - git clone -b $QE_VERSION --single-branch --depth 1 https://gitlab.com/QEF/q-e.git QEDIR
Marco Govoni's avatar
Marco Govoni committed
30
    - cd QEDIR
Victor Yu's avatar
Victor Yu committed
31
32
    - git describe --tags --always
    - ./configure
33
    - make -j4 pw
Marco Govoni's avatar
Marco Govoni committed
34
35
36
    - ls bin
    - git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
    - cd West
Victor Yu's avatar
Victor Yu committed
37
    - git describe --tags --always
Marco Govoni's avatar
Marco Govoni committed
38
    - make conf PYT=python3 PYT_LDFLAGS="`python3-config --ldflags --embed`"
39
    - make -j4 all
Victor Yu's avatar
Victor Yu committed
40
41
    - ls ../bin

Marco Govoni's avatar
Marco Govoni committed
42
43
44
.template_test:
  stage: test
  script:
Victor Yu's avatar
Victor Yu committed
45
    - git clone -b $QE_VERSION --single-branch --depth 1 https://gitlab.com/QEF/q-e.git QEDIR
Marco Govoni's avatar
Marco Govoni committed
46
    - cd QEDIR
Victor Yu's avatar
Victor Yu committed
47
48
    - git describe --tags --always
    - ./configure
49
    - make -j4 pw
Marco Govoni's avatar
Marco Govoni committed
50
51
    - ls bin
    - git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
Victor Yu's avatar
Victor Yu committed
52
53
    - cd West
    - git describe --tags --always
Marco Govoni's avatar
Marco Govoni committed
54
    - make conf PYT=python3 PYT_LDFLAGS="`python3-config --ldflags --embed`"
55
    - make -j4 all
Victor Yu's avatar
Victor Yu committed
56
    - cd test-suite
57
    - make NP=$CI_NP NI=$CI_NI NB=$CI_NB NT=$CI_NT
Victor Yu's avatar
Victor Yu committed
58
59
60
61
62
63
64
65
66
  artifacts:
    when: on_failure
    paths:
      - QEDIR/West/test-suite/test*/*.out
      - QEDIR/West/test-suite/test*/*.err
      - QEDIR/West/test-suite/test*/*.tab
      - QEDIR/West/test-suite/test*/test*/*.xml
      - QEDIR/West/test-suite/test*/test*/*.json
    expire_in: 3 days
67

Victor Yu's avatar
Victor Yu committed
68
69
# Builds

Victor Yu's avatar
Victor Yu committed
70
71
72
73
gcc840:
  extends:
    - .template_bot_start
    - .template_build
Marco Govoni's avatar
Marco Govoni committed
74

Victor Yu's avatar
Victor Yu committed
75
76
77
78
gcc930:
  extends:
    - .template_bot_start
    - .template_build
Marco Govoni's avatar
Marco Govoni committed
79

Victor Yu's avatar
Victor Yu committed
80
81
# Tests

Victor Yu's avatar
Victor Yu committed
82
gcc840_t:
Victor Yu's avatar
Victor Yu committed
83
84
85
  variables:
    CI_NP: 8
    CI_NI: 1
86
    CI_NB: 1
Victor Yu's avatar
Victor Yu committed
87
    CI_NT: 1
Victor Yu's avatar
Victor Yu committed
88
89
90
91
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc840
Marco Govoni's avatar
Marco Govoni committed
92

Victor Yu's avatar
Victor Yu committed
93
gcc930_t:
Victor Yu's avatar
Victor Yu committed
94
95
  variables:
    CI_NP: 8
96
97
    CI_NI: 2
    CI_NB: 2
Victor Yu's avatar
Victor Yu committed
98
    CI_NT: 1
Victor Yu's avatar
Victor Yu committed
99
100
101
102
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc930
jhskone's avatar
jhskone committed
103

Victor Yu's avatar
Victor Yu committed
104
105
106
107
# Nightly tests

gcc840_t2:
  variables:
108
    CI_NP: 8
Victor Yu's avatar
Victor Yu committed
109
    CI_NI: 2
110
111
    CI_NB: 1
    CI_NT: 2
Victor Yu's avatar
Victor Yu committed
112
113
114
115
116
117
118
119
120
  only:
    - schedules
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc840

gcc930_t2:
  variables:
121
122
123
    CI_NP: 8
    CI_NI: 1
    CI_NB: 2
Victor Yu's avatar
Victor Yu committed
124
125
126
127
128
129
130
131
132
133
    CI_NT: 2
  only:
    - schedules
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc930

# Doc

jhskone's avatar
jhskone committed
134
west_doc_build:
Victor Yu's avatar
Victor Yu committed
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
  tags: [rcc,docker,node-01]
  stage: doc
  image: continuumio/miniconda3:latest
  before_script:
    - apt-get update > /dev/null
    - export TZ="US/Central"
    - apt-get install -qq make > /dev/null
    - apt-get install -qq pandoc > /dev/null
    - rm -f /etc/localtime
    - cp /usr/share/zoneinfo/$TZ /etc/localtime
    - pip install -q --upgrade pip
    - pip install -q nbsphinx
    - pip install -q sphinx_rtd_theme
    - pip install -q ipython
  script:
    - git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
    - cd West
    - git describe --tags --always
    - cd Doc
    - make html
    - ls _build/html