.gitlab-ci.yml 2.7 KB
Newer Older
Swann Perarnau's avatar
Swann Perarnau committed
1
variables:
2
  ARGOPKGS : "https://xgitlab.cels.anl.gov/argo/argopkgs/-/archive/master/argopkgs-master.tar.gz"
Swann Perarnau's avatar
Swann Perarnau committed
3

4
stages:
5
  - style
6
  - build
7
  - docs
8
  - release
9

10 11
repoquality:
  stage: style
12 13 14
  except:
    - /^wip.*/
    - /^WIP.*/
15
  script:
16
    - git ls-files *.c *.h | grep -v -e benchmarks > .repoquality
17 18
    - nix run -f "$ARGOPKGS" repoquality --command repoquality
  tags:
19 20
    - nix
    - kvm
21 22 23 24
  artifacts:
    when: on_failure
    paths:
      - .repoquality
25 26 27

checkpatch:
  stage: style
28 29 30
  except:
    - /^wip.*/
    - /^WIP.*/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
31
  tags:
32 33
    - nix
    - kvm
34
  script:
35
    - git ls-files *.c *.h | grep -v -e benchmarks >> .checkpatch.conf
36 37
    - nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl

38 39 40 41 42 43
style:docs:
  stage: style
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
44 45
    - nix
    - kvm
46 47 48 49 50 51 52 53 54 55 56 57 58
  script:
    - |
      nix-shell "$ARGOPKGS" -A aml-dist --arg aml-src ./. --run bash << EOF
      ./autogen.sh
      mkdir build
      ./configure --prefix=`pwd`/build --enable-docs
      make install-data
      EOF
  artifacts:
    when: on_failure
    paths:
      - config.log

59
make:generic:
60 61
  tags:
    - knl
62
  stage: build
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
63 64 65
  except:
    - /^wip.*/
    - /^WIP.*/
66
  variables:
67
    CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
68
  script:
69
    - ./autogen.sh
70
    - mkdir build
71 72 73
    - ./configure --prefix=`pwd`/build
    - make
    - make check
74
    - make install
75 76 77
  artifacts:
    when: on_failure
    paths:
78
      - config.log
79
      - tests/*.log
80

81
make:out-of-tree:
82 83
  tags:
    - knl
84 85 86 87 88
  stage: build
  except:
    - /^wip.*/
    - /^WIP.*/
  variables:
89
    CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
90
  script:
91
    - ./autogen.sh
92 93
    - mkdir out
    - cd out
94 95
    - mkdir build
    - ../configure --prefix=`pwd`/build
96 97 98 99 100 101 102 103
    - make
    - make check
  artifacts:
    when: on_failure
    paths:
      - config.log
      - tests/*.log

104 105
make:knl:
  stage: build
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
106 107 108 109 110
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
    - knl
111
  script:
112
    - source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
113 114
    - ./autogen.sh
    - mkdir build
115
    - CC=icc CFLAGS="-mkl -xhost" ./configure --prefix=`pwd`/build --enable-benchmarks
116
    - make -j64
117
    - make check
118
    - make install
119 120 121
  artifacts:
    when: on_failure
    paths:
122
      - config.log
123
      - tests/*.log
Swann Perarnau's avatar
Swann Perarnau committed
124

125
readthedocs:
126
  stage: docs
127 128
  when: on_success
  only:
129
    - staging
130
    - master
131
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
132
  tags:
133 134
    - nix
    - kvm
135 136 137
  environment:
    name: rtd/$CI_COMMIT_REF_NAME
    url: https://argo-aml.readthedocs.io/en/$CI_COMMIT_REF_NAME
138
  script:
139
    - nix run nixpkgs.curl -c curl -X POST -d "branches=$CI_COMMIT_REF_NAME" -d "token=$READTHEDOCS_TOKEN" https://readthedocs.org/api/v2/webhook/argo-aml/83161/
140