.gitlab-ci.yml 2.52 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 16 17 18 19 20 21
  script:
    - nix run -f "$ARGOPKGS" repoquality --command repoquality
  tags:
    - integration

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

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

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

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

93
readthedocs:
94
  stage: docs
95 96 97
  except:
    - /^wip.*/
    - /^WIP.*/
98 99 100
  when: on_success
  only:
    - master
101
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
102 103
  tags:
    - integration
104 105
  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/
106

107
dist:
108
  stage: release
109 110 111
  except:
    - /^wip.*/
    - /^WIP.*/
112 113 114
  when: on_success
  only:
    - tags
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
115 116
  tags:
    - integration    
117
  script:
118
    - nix-build "$ARGOPKGS" -A aml-dist --arg aml-src ./.
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
119
    - 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"
120 121 122 123 124 125
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - CHECKSUM
    expire_in: 1000y
126