.gitlab-ci.yml 2.31 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 31
  variables:
    CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
32 33
  script:
    - mkdir build
34
    - ./autogen.sh
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 51 52 53 54 55 56 57 58 59 60 61 62 63
make:out-of-tree:
  stage: build
  except:
    - /^wip.*/
    - /^WIP.*/
  variables:
    CFLAGS: "-std=c99 -pedantic -Wall -Wextra -Werror -Wno-unused-but-set-parameter"
  script:
    - mkdir out
    - cd out
    - ../configure
    - make
    - make check
  artifacts:
    when: on_failure
    paths:
      - config.log
      - tests/*.log

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

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

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