.gitlab-ci.yml 1.94 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
7
  - dist
8
  - release
9 10 11 12 13 14 15 16 17

make:generic:
  stage: build
  script:
    - ./autogen.sh
    - mkdir build
    - ./configure --prefix=`pwd`/build
    - make
    - make check
18
    - make install
19 20 21 22
  artifacts:
    when: on_failure
    paths:
      - tests/*.log
23 24 25
  except:
    - /^wip.*/
    - /^WIP.*/
26 27 28 29

make:knl:
  stage: build
  script:
30
    - source /opt/intel/compilers_and_libraries/linux/bin/compilervars.sh intel64
31 32
    - ./autogen.sh
    - mkdir build
33
    - CC=icc CFLAGS="-mkl -xhost" ./configure --prefix=`pwd`/build --enable-benchmarks
34
    - make -j64
35
    - make check
36
    - make install
37 38 39 40 41 42 43 44 45
  artifacts:
    when: on_failure
    paths:
      - tests/*.log
  except:
    - /^wip.*/
    - /^WIP.*/
  tags:
    - knl
Swann Perarnau's avatar
Swann Perarnau committed
46 47

repoquality:
48
  stage: style
Swann Perarnau's avatar
Swann Perarnau committed
49 50 51 52
  script:
    - nix run -f "$ARGOPKGS" repoquality --command repoquality
  tags:
    - integration
53 54 55 56

checkpatch:
  stage: style
  script:
57
    - nix run -f "$ARGOPKGS" checkpatch --command checkpatch.pl
58

59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
dist-artifacts:
  stage: dist
  when: on_success
  only:
    - tags
  script:
    - nix-build "$ARGOPKGS" -A aml-dist --arg aml-src ./.
    - echo "$CI_JOB_ID" > .cijobid
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - .cijobid
    expire_in: 1h

74 75 76 77 78
readthedocs:
  stage: release
  when: on_success
  only:
    - master
79
    - /v\.[0-9]+\.[0-9]+\.x/
80 81
  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/
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98

dist-release:
  stage: release
  when: on_success
  only:
    - tags
  dependencies: 
    - dist-artifacts    
  script:
    - CI_ARTIFACT_JOB_ID="$(cat .cijobid)"
    - ./release.sh CREATE $CI_ARTIFACT_JOB_ID $CI_PROJECT_ID $RELEASE_TOKEN $CI_COMMIT_REF_NAME
  artifacts:
    when: on_success
    paths:
      - result/*.tar.gz
      - CHECKSUM
    expire_in: 1000y