.gitlab-ci.yml 1.68 KB
Newer Older
Sébastien Dinot's avatar
Sébastien Dinot committed
1
2
variables:
  DOCKER_DRIVER: overlay2
3
  GIT_DEPTH: "3"
Sébastien Dinot's avatar
Sébastien Dinot committed
4
5
6
7

stages:
  - build

8
.general:
Sébastien Dinot's avatar
Sébastien Dinot committed
9
10
11
12
13
  retry:
    max: 2
    when:
      - runner_system_failure
      - stuck_or_timeout_failure
Antoine Regimbeau's avatar
Antoine Regimbeau committed
14
15
  # variables:
  #   CI_DEBUG_TRACE: "true"
Sébastien Dinot's avatar
Sébastien Dinot committed
16

Antoine Regimbeau's avatar
Typo  
Antoine Regimbeau committed
17
native-build:
18
  extends: .general
19
  only: [merge_requests]
Sébastien Dinot's avatar
Sébastien Dinot committed
20
  stage: build
21
  image: registry.orfeo-toolbox.org/gbonnefille/otb-build-env/otb-ubuntu-native:18.04
Sébastien Dinot's avatar
Sébastien Dinot committed
22
  script:
Antoine Regimbeau's avatar
Antoine Regimbeau committed
23
    - ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-gcc
Antoine Regimbeau's avatar
Antoine Regimbeau committed
24

25
.build-common:
26
  extends: .general
Antoine Regimbeau's avatar
Antoine Regimbeau committed
27
  stage: build
28
  image: registry.orfeo-toolbox.org/gbonnefille/otb-build-env/otb-ubuntu-shark:18.04
29
30
31
32
33
34
35
36
37
  before_script:
    # ccache configuration
    - mkdir -p ccache
    - export CCACHE_BASEDIR=${PWD}
    - export CCACHE_DIR=${PWD}/ccache
    - echo "max_size = 3G" > ccache/ccache.conf
    - echo "run_second_cpp = true" >> ccache/ccache.conf
    - echo "compiler_check = content" >> ccache/ccache.conf
    - echo "sloppiness = time_macros" >> ccache/ccache.conf
Antoine Regimbeau's avatar
Antoine Regimbeau committed
38
  script:
Guillaume Pasero's avatar
Guillaume Pasero committed
39
    - ctest -VV -S CI/main_ci.cmake -DIMAGE_NAME:string=ubuntu-18.04-llvm-shark
40
41
42
43
  cache:
    key: "ubuntu-18.04-llvm-shark"
    paths:
      - ccache/
44
45
46
47
48
49
50
51
52

build-wip:
  extends: .build-common
  variables:
    OTB_CI_PROFILE: 'wip'
  except:
    - merge_requests
    - develop
    - /^release-[0-9]+\.[0-9]+$/
53
54
  cache:
    policy: pull
55
56
57
58
59
60
61

build-mr:
  extends: .build-common
  variables:
    OTB_CI_PROFILE: 'mr'
  only:
    - merge_requests
62
63
  cache:
    policy: pull
64
65
66
67
68
69
70

build-develop:
  extends: .build-common
  variables:
    OTB_CI_PROFILE: 'develop'
  only:
    - develop
71
72
  cache:
    policy: pull-push
73
74
75
76
77
78
79

build-release:
  extends: .build-common
  variables:
    OTB_CI_PROFILE: 'release'
  only:
    - /^release-[0-9]+\.[0-9]+$/
80
81
  cache:
    policy: pull