.gitlab-ci.yml 2.4 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 12 13 14 15 16 17 18
repoquality:
  stage: style
  script:
    - nix run -f "$ARGOPKGS" repoquality --command repoquality
  tags:
    - integration

checkpatch:
  stage: style
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
19 20
  tags:
    - integration
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
21
  script:
22
    - git ls-files *.c *.h | grep -v -e tests -e benchmarks >> .checkpatch.conf
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
23 24
    - nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl

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

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

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

87
readthedocs:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
88
  stage: docs
89 90 91
  when: on_success
  only:
    - master
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
92
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
93 94
  tags:
    - integration
95 96
  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/
97

Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
98
dist:
99 100 101 102
  stage: release
  when: on_success
  only:
    - tags
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
103 104
  tags:
    - integration    
105
  script:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
106
    - nix-build "$ARGOPKGS" -A aml-dist --arg aml-src ./.
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
107
    - 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"
108 109 110 111 112 113
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - CHECKSUM
    expire_in: 1000y
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
114