.gitlab-ci.yml 1.9 KB
Newer Older
1 2
stages:
- init
3 4
- build
- test
5
- deploy
6

7 8 9 10 11 12 13 14
variables:
  DEPLOY_TAG: registry.gitlab.inria.fr/why3/why3:latest

init:
  stage: init
  script:
    - docker build -t bench-image -f misc/Dockerfile.init .

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
.init_template: &init_definition
  stage: init
  script:
    - docker build -t bench-image-$COMPILER -f misc/Dockerfile.init --build-arg compiler=$COMPILER .

init-4.03.0:
  variables:
    COMPILER: 4.03.0
  <<: *init_definition

init-4.04.0:
  variables:
    COMPILER: 4.04.0
  <<: *init_definition

init-4.05.0:
  variables:
    COMPILER: 4.05.0
  <<: *init_definition

init-4.06.0:
  variables:
    COMPILER: 4.06.0
  <<: *init_definition

build:
  stage: build
  script:
    - docker run -t --rm bench-image misc/build.sh

.build_template: &build_definition
  stage: build
  script:
    - docker run -t --rm bench-image-$COMPILER misc/build.sh

build-4.03.0:
  variables:
    COMPILER: 4.03.0
  <<: *build_definition

build-4.04.0:
  variables:
    COMPILER: 4.04.0
  <<: *build_definition

build-4.05.0:
  variables:
    COMPILER: 4.05.0
  <<: *build_definition

build-4.06.0:
  variables:
    COMPILER: 4.06.0
  <<: *build_definition

70
bench:
71 72 73 74 75 76
  stage: test
  script:
    - docker run -t --rm bench-image misc/ci-bench.sh

.bench_template: &bench_definition
  stage: test
77
  script:
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
    - docker run -t --rm bench-image-$COMPILER misc/ci-bench.sh
  only:
    - tags
    - schedules

bench-4.03.0:
  variables:
    COMPILER: 4.03.0
  <<: *bench_definition

bench-4.04.0:
  variables:
    COMPILER: 4.04.0
  <<: *bench_definition

bench-4.05.0:
  variables:
    COMPILER: 4.05.0
  <<: *bench_definition

bench-4.06.0:
  variables:
    COMPILER: 4.06.0
  <<: *bench_definition
102 103 104

deploy:
  stage: deploy
105
  script:
106 107 108 109 110 111
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.inria.fr
    - docker build -t deploy-image -f misc/Dockerfile.deploy .
    - docker tag deploy-image $DEPLOY_TAG
    - docker push $DEPLOY_TAG
  only:
    - master