.gitlab-ci.yml 1.96 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 34 35 36 37
  script:
    - ./autogen.sh
    - mkdir build
    - ./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

make:knl:
  stage: build
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
47 48 49 50 51
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
    - knl
52
  script:
53
    - source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
54 55
    - ./autogen.sh
    - mkdir build
56
    - CC=icc CFLAGS="-mkl -xhost" ./configure --prefix=`pwd`/build --enable-benchmarks
57
    - make -j64
58
    - make check
59
    - make install
60 61 62 63
  artifacts:
    when: on_failure
    paths:
      - tests/*.log
Swann Perarnau's avatar
Swann Perarnau committed
64

65
readthedocs:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
66
  stage: docs
67 68 69
  when: on_success
  only:
    - master
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
70
    - /v[0-9]+\.[0-9]+\.x/
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
71 72
  tags:
    - integration
73 74
  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/
75

Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
76
dist:
77 78 79 80
  stage: release
  when: on_success
  only:
    - tags
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
81 82
  tags:
    - integration    
83
  script:
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
84
    - nix-build "$ARGOPKGS" -A aml-dist --arg aml-src ./.
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
85
    - 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"
86 87 88 89 90 91
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - CHECKSUM
    expire_in: 1000y
Nicolas Denoyelle's avatar
Nicolas Denoyelle committed
92