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

6 7
.build_template: &build_definition
  stage: build
8 9
  script:
    - docker build -t bench-image-$COMPILER -f misc/Dockerfile.init --build-arg compiler=$COMPILER .
10
    - docker run -t --rm bench-image-$COMPILER misc/ci-local.sh
11 12

build:
13 14 15
  variables:
    COMPILER: system
  <<: *build_definition
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36

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

37
bench:
38
  stage: test
39 40
  variables:
    COMPILER: system
41
  script:
42 43
    - docker build -t bench-image-$COMPILER -f misc/Dockerfile.init --build-arg compiler=$COMPILER .
    - docker run -t --rm bench-image-$COMPILER misc/ci-local.sh bench
44 45 46

.bench_template: &bench_definition
  stage: test
47
  script:
48 49
    - docker build -t bench-image-$COMPILER -f misc/Dockerfile.init --build-arg compiler=$COMPILER .
    - docker run -t --rm bench-image-$COMPILER misc/ci-local.sh bench
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
  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
73 74 75

deploy:
  stage: deploy
76
  script:
77
    - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
78
    - docker build -t deploy-image -f misc/Dockerfile.deploy .
79 80
    - docker tag deploy-image $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
    - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
81
  only:
82
    - master