.gitlab-ci.yml 2.58 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
make:generic:
  stage: build
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
34 35 36
  except:
    - /^wip.*/
    - /^WIP.*/
37
  variables:
38
    CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
39
  script:
40
    - ./autogen.sh
41
    - mkdir build
42 43 44
    - ./configure --prefix=`pwd`/build
    - make
    - make check
45
    - make install
46 47 48
  artifacts:
    when: on_failure
    paths:
49
      - config.log
50
      - tests/*.log
51

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

73 74
make:knl:
  stage: build
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
75 76 77 78 79
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
    - knl
80
  script:
81
    - source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
82 83
    - ./autogen.sh
    - mkdir build
84
    - CC=icc CFLAGS="-mkl -xhost" ./configure --prefix=`pwd`/build --enable-benchmarks
85
    - make -j64
86
    - make check
87
    - make install
88 89 90
  artifacts:
    when: on_failure
    paths:
91
      - config.log
92
      - tests/*.log
Swann Perarnau's avatar
Swann Perarnau committed
93

94
readthedocs:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
95
  stage: docs
96 97 98
  except:
    - /^wip.*/
    - /^WIP.*/
99 100 101
  when: on_success
  only:
    - master
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
102
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
103 104
  tags:
    - integration
105 106
  script:
    - nix run nixpkgs.curl -c curl -X POST -d "branch=$CI_COMMIT_REF_NAME" -d "token=$READTHEDOCS_TOKEN" https://readthedocs.org/api/v2/webhook/argo-aml/83161/
107

Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
108
dist:
109
  stage: release
110 111 112
  except:
    - /^wip.*/
    - /^WIP.*/
113 114 115
  when: on_success
  only:
    - tags
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
116 117
  tags:
    - integration    
118
  script:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
119
    - nix-build "$ARGOPKGS" -A aml-dist --arg aml-src ./.
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
120
    - nix-shell "$ARGOPKGS" -A aml-dist --arg aml-src ./. --run  "./release.sh CREATE $CI_JOB_ID $CI_PROJECT_ID $RELEASE_TOKEN $CI_COMMIT_REF_NAME"
121 122 123 124 125 126
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - CHECKSUM
    expire_in: 1000y
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
127