.gitlab-ci.yml 3.1 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

Marco Govoni's avatar
Marco Govoni committed
10
.template_bot_start:
Marco Govoni's avatar
Marco Govoni committed
11
12
  tags: [rcc,docker,node-01]
  image: miccomcenter/bot:$CI_JOB_NAME
Victor Yu's avatar
Victor Yu committed
13
  before_script:
Marco Govoni's avatar
Marco Govoni committed
14
15
16
17
18
19
20
    - 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
21
22
23
    - 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
24
25
.template_build:
  stage: build
Marco Govoni's avatar
Marco Govoni committed
26
  script:
Victor Yu's avatar
Victor Yu committed
27
    - git clone -b $QE_VERSION --single-branch --depth 1 https://gitlab.com/QEF/q-e.git QEDIR
Marco Govoni's avatar
Marco Govoni committed
28
    - cd QEDIR
Victor Yu's avatar
Victor Yu committed
29
30
31
    - git describe --tags --always
    - ./configure
    - make -j8 pw
Marco Govoni's avatar
Marco Govoni committed
32
33
34
    - ls bin
    - git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
    - cd West
Victor Yu's avatar
Victor Yu committed
35
    - git describe --tags --always
Marco Govoni's avatar
Marco Govoni committed
36
    - make conf PYT=python3 PYT_LDFLAGS="`python3-config --ldflags --embed`"
Marco Govoni's avatar
Marco Govoni committed
37
    - make all
Victor Yu's avatar
Victor Yu committed
38
39
    - ls ../bin

Marco Govoni's avatar
Marco Govoni committed
40
41
42
.template_test:
  stage: test
  script:
Victor Yu's avatar
Victor Yu committed
43
    - git clone -b $QE_VERSION --single-branch --depth 1 https://gitlab.com/QEF/q-e.git QEDIR
Marco Govoni's avatar
Marco Govoni committed
44
    - cd QEDIR
Victor Yu's avatar
Victor Yu committed
45
46
47
    - git describe --tags --always
    - ./configure
    - make -j8 pw
Marco Govoni's avatar
Marco Govoni committed
48
49
    - ls bin
    - git clone -b $CI_COMMIT_REF_NAME $CI_REPOSITORY_URL West
Victor Yu's avatar
Victor Yu committed
50
51
    - cd West
    - git describe --tags --always
Marco Govoni's avatar
Marco Govoni committed
52
    - make conf PYT=python3 PYT_LDFLAGS="`python3-config --ldflags --embed`"
Victor Yu's avatar
Victor Yu committed
53
54
55
56
57
58
59
60
61
62
63
64
    - make all
    - cd test-suite
    - make NP=8 NI=1 NT=1
  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
65

Victor Yu's avatar
Victor Yu committed
66
67
68
69
gcc840:
  extends:
    - .template_bot_start
    - .template_build
Marco Govoni's avatar
Marco Govoni committed
70

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

Victor Yu's avatar
Victor Yu committed
76
77
78
79
80
gcc840_t:
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc840
Marco Govoni's avatar
Marco Govoni committed
81

Victor Yu's avatar
Victor Yu committed
82
83
84
85
86
gcc930_t:
  extends:
    - .template_bot_start
    - .template_test
  image: miccomcenter/bot:gcc930
jhskone's avatar
jhskone committed
87
88

west_doc_build:
Victor Yu's avatar
Victor Yu committed
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
  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