.gitlab-ci.yml 2.65 KB
Newer Older
Swann Perarnau's avatar
Swann Perarnau committed
1
variables:
Valentin Reis's avatar
Valentin Reis committed
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
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
7
  - docs
8
  - release
9

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

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

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
style:docs:
  stage: style
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
    - integration
  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

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

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

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

118
readthedocs:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
119
  stage: docs
120 121
  when: on_success
  only:
122
    - staging
123
    - master
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
124
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
125 126
  tags:
    - integration
127 128 129
  environment:
    name: rtd/$CI_COMMIT_REF_NAME
    url: https://argo-aml.readthedocs.io/en/$CI_COMMIT_REF_NAME
130
  script:
131
    - 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/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
132