.gitlab-ci.yml 2.59 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 20 21 22
    - nix run -f "$ARGOPKGS" repoquality --command repoquality
  tags:
    - integration

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

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
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

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

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

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

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